How do I split a large script into small pieces?
agerion
09 Nov 2011, 20:39I have a game I'm making and the tutorial is a rather large intro. The intro ends with the player typing the command "use" for the object "car." When the player does this, I wan't a song to play, a picture to pop up, a text block to appear, and the player be transported to another room. However, I don't want the player to have to scroll up through all of this to catch it all.
So how do I make a script that will, when an action is used on an object (and in this order):
- Start an MP3
- Display a text block
- Require the player to press a key to continue
- Upon pressing a key, display a picture (the title picture)
- Require the player to press a key to continue
- Upon pressing a key, transport the player to another room
Is there a way to make all of that happen just by typing "use car?"
So how do I make a script that will, when an action is used on an object (and in this order):
- Start an MP3
- Display a text block
- Require the player to press a key to continue
- Upon pressing a key, display a picture (the title picture)
- Require the player to press a key to continue
- Upon pressing a key, transport the player to another room
Is there a way to make all of that happen just by typing "use car?"
Alex
09 Nov 2011, 20:59You just need to put all of those script commands in order. There is a "Wait for the player to press a key" command in the "Other" category.
agerion
09 Nov 2011, 22:51Honestly, I didn't expect it to be that easy! Kudos on such an amazing program! Also, thank you for your help!