Script Commands in Specific order...

Started by Yo Mama!, Sun 11/04/2004 00:09:47

Previous topic - Next topic

Yo Mama!

In the scripts for one of my rooms, I want the player to say some stuff, walk over to an object, have the object disappear like he picked it up, then say some more stuff, then walk to a certain area, then say some more stuff. When I tried the script, It did all the things I wanted it to do all out of the order the script was in. How do I get it to run the script from the beginning to the end in order, instead of chunks of it here and chunks there? Here is the script:

 // script for room: Player enters screen (after fadein)
DisplaySpeech (MAIN , "Message 1");
DisplaySpeech (MAIN , "Message 2");
MoveCharacter (MAIN, 81, 223);
DisplaySpeech (MAIN , "Message 3");
DisplaySpeech (MAIN , "Message 4");
ObjectOff (0);
MoveCharacter (MAIN, 251, 165);
WaitKey (80);
DisplaySpeech (MAIN , "Message 5");
WaitKey (80);
Display ("Message 6");
DisplaySpeech (MAIN , "Message 7");
Display ("Message 8");
DisplaySpeech (MAIN , "Message 9");
DisplaySpeech (MAIN , "Message 10");
DisplaySpeech (MAIN , "Message 11");

And here is how it's running it:

 // script for room: Player enters screen (after fadein)
DisplaySpeech (MAIN , "Message 1");
DisplaySpeech (MAIN , "Message 2");
DisplaySpeech (MAIN , "Message 3");
DisplaySpeech (MAIN , "Message 4");
MoveCharacter (MAIN, 251, 165);
ObjectOff (0);
WaitKey (80);
DisplaySpeech (MAIN , "Message 5");
WaitKey (80);
Display ("Message 6");
DisplaySpeech (MAIN , "Message 7");
Display ("Message 8");
DisplaySpeech (MAIN , "Message 9");
DisplaySpeech (MAIN , "Message 10");
DisplaySpeech (MAIN , "Message 11");

He doesn't walk to the first spot, and the object doesn't disappear until after he moves to the second spot.

Yo Mama!

#1
OK I figured out all the problems. It was a simple mistake. I used the MoveCharacter instead of MoveCharacterBlocking. Woops!

But I have another question: Is it possible to play a video inside of a room at specific coordinates and size, with out having the black border or anything?

Scorpiorus

Nope, you have to use animation (character/object) functions in that case.

SMF spam blocked by CleanTalk