RunScript (containing move), DisplayMessage executed in wrong order

Started by yort, Tue 25/10/2005 10:56:25

Previous topic - Next topic

yort

Hi All,

I'm having another problem.

Some places in my game, I've used the interaction editor to add two actions like this;

1. RunScript
2. DisplayMessage(31)

Where the script that is run is something like;
character[EGO].Walk(120, 150, eBlock, eWalkableAreas);
character[EGO].FaceObject(oEngdust, eBlock);


Sometimes the script includes some more commands, but it doesn't really seem to matter.

In anycase, the symptom is the message specified as the second action is shown before the script is run. I've tried putting in a 'while' loop after the move, so the script looks like;

character[EGO].Walk(120, 150, eBlock, eWalkableAreas);
character[EGO].FaceObject(oEngdust, eBlock);
while (character[EGO].walking)
{
Wait(10);
}


but it makes no difference.

Should I expect the script to be executed first (and finish executing), or am I missing something ?

Thanks all.

strazer

"Run Script" actions are always executed last.
Just put the interaction editor action in the script as well. Check the manual for the function you need (Display/DisplayMessage/Character.Say or some such).

yort

Thanks, despite having read a lot of the help, I didn't know that.
I'll re-code my interactions.

Thanks again.  :)

SMF spam blocked by CleanTalk