Strange problem with scripts... bug?

Started by InCreator, Thu 01/07/2004 16:30:14

Previous topic - Next topic

InCreator

Okay, problem is here:

Under character's (NPC) condition "Talk to character" I have a script like that:

RunDialog(0);
if (GetGlobalInt(17)==0)
MoveCharacterBlocking(NAME,x,y,0);

(Movecharacterblocking command is actually with real script name and numbers for x and y but this is not important right now)

Problem is that I want NPC to go away after dialog when one of dialog's topics have made him angry (have set globalint 17 to value 0 directly from dialog script) -- but -- He moves first to the place and THEN activates RunDialog, though I thought that AGS executes commands as they are placed in script, like first command first, then second, then third, etc.

Why doesn'tÃ,  AGS execute dialog first and THEN check for globalint?

SSH

Becuase dialogs only start after the rest of the script has been run: it's in the manual. You'll need to use run-script in your dialog to get the effect you want, probably. Or you could check the globalint in repeatedly_execute.
12

SMF spam blocked by CleanTalk