having a problem. Game - Display Message takes precedence? *SOLVED*

Started by , Wed 07/06/2006 05:33:44

Previous topic - Next topic

diedie

I've looked in the help file and the BFAQ and I can't seem to find an answer to this. I'm sorry if this is a stupid question, but it's really bugging me. I have an interaction on an object set up like so.. (just the basics here)

Move character to such and such location
Face such and such location
Run script (which is to display a .avi or .wmv file or something, it works fine.)
Remove object from room
Give inventory object
Game - Display Message

The message displays before the script runs, no matter what I do. I've tried setting up a variable condition, but no dice. Can anyone tell me why the Game - Display Message function insists on being done before the movie plays? For this to work correctly, the movie has to play and then be followed by the message, or it looks really stupid.

I hope this is clear and not completely stupid. If anyone can help me out, I'd appreciate it. Thanks.

edit:
Yeah, I wasn't writing scripts, just using the interaction things. I fixed it now, though. Thanks!

Hollister Man

#1
I re-read your post, original message is below, but I thought of a different answer:

You might try writing the whole thing into a script, where you can control the blocking/non-blocking stuff more carefully.  The interaction editor is nice, but not very feature-rich.  Most hardcore users promptly ignore it.




I may be wrong, but it sounds like you're using non-blocking functions.  So everything tries to happen at once.  Its possible that you're telling it to, in effect:

Move Character, face direction, run script, remove object, give inventory, and display message instantly.

instead of:

Move character, then face direction, then run script, then remove object...etc.

I don't know enough about the new scripting setup to give off-the-cuff answers, but you might check the manual under Blocking?  Or wait for someone smarter to answer. :P
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Khris

I may be wrong, but I believe that in this case, the RunScript-interaction gets queued and is executed last.

So remove the other actions and edit the Script:
Code: ags
player.Walk(x, y, eBlock);
player.FaceLocation(x, y, eBlock);
oObjectname.Visible=false;
PlayVideo("path to file", 0, 11);
player.AddInventory(iItemname);
Display("Message");


The scripting language isn't too hard, I'd really try to use it instead.
And the interaction editor even displays the equivalent script command at the bottom of the window.

SSH

Yes, scripts always run after all other things in the interaction editor.
12

SMF spam blocked by CleanTalk