You'd use if statements and a boolean or an integer to do this.
Let's say the elevator button is an object called
Button. Give it an attribute called
Push. Make it an
integer and set it to 0.
Let's say Button has a verb called
Press. The script might look like this:
if (Button.Push = 0) {
Button.Push = Button.Push + 1
msg ("The elevator is coming.")
}
else if (Button.Push = 1) {
Button.Push = Button.Push + 1
msg ("Okay, okay. The elevator is on its way. Sheesh.")
}
else if (Button.Push = 2) {
msg ("Pressing that button won't make the elevator come any faster.")
}
When you press the button, it adds +1 to Button.Push. The message changes depending on if Button.Push is 0, 1, or 2. When it reaches 2, it won't add any more to Button.Push, so every time the player "Presses" the button, it'll always say the last message.