I found a bug -
I got a region, with "player walks onto region" action "Game - Display Message()"
Inside this region, there is a hotspot, with a "walk-to" point.
When the player clicks the "use" icon on the hotspot - the character starts walking, then it enters the region, displays the mesaage, and the game freezes...
I haven't been able to replicate this. What interaction have you got in your "Interact hotspot" event?
I got it in two seperate regions (same bug):
first one - run script, the script being:
// script for hotspot6: Interact hotspot
if (character[0].inv[3]==0) // Don't have magnetic boots yet
{
Display("Hey, I just found magnetic boots");
Display("I'm sure they'll be handy");
AddInventory(3);
DisableRegion(2);
GiveScore(5);
}
else
{
Display("I can get nothing more from this body");
}
================================
Second region got 2 actions:
Games - Add score on first execution()
Run script, the script being:
// script for hotspot1: Interact hotspot
if (GetGlobalInt (1)<10) // Not fully charged
{
DisplayMessage(3);
SetGlobalInt (1,10);
SetButtonPic (2,28,1,42); // Set PowerBar to full
}
else if (GetGlobalInt (1)==10) // Fully Charged
DisplaySpeech (EGO , "I already got all the energy I can take");
else //GlobalInt(1)==11 // Got charging working
DisplaySpeech (EGO , "I Don't need this energy, I got a charging system of my own now");
==================================
Anyway the game freezes before the scripts get executed.
I use version 2.60 SP1
I tried that out and didn't have any problems. When the game freezes, does pressing Alt+X come out of it? If so, does it mention a script line number?
Failing that, any chance you could upload the game?
Alt-X works, the message is:
"Global script line 76"
which is the line marked by <--- in the following script:
============================
function on_mouse_click(int button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
}
else { // right-click, so cycle cursor
SetNextCursorMode();
}
}
===========================
I can upload the game, or E-Mail it (it's about 2.5M)
if you give me where to upload or an E-Mail
Hmm, odd.
Could you email it to cjattach@jibblers.plus.com
cheers
OK, mail sent.
Hope you can find a solution ...
Have fun playing the begining of Blaster's Blasting Adventure.
Ah, thanks for sending it, I've found the problem. It's getting a bit confused because a region interaction is running inside the Move To Hotspot code. I'll get it fixed.