<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<attr name="train_current_stop" type="object">train_station_1</attr>
<attr name="train_variable_x" type="int">0</attr>
</game>
<object name="train_station_1">
<inherit name="editor_room" />
<alias>train station 1</alias>
<object name="train_1">
<inherit name="editor_room" />
<alias>train</alias>
<onenter type="script">
// this syntax, and~or script name, for this script block may be incorrect, as I haven't looked it up, just guessing
EnableTimer (train_1_timer)
</onenter>
<timer name="train_1_timer">
<attr name="enabled" type="boolean">false</attr>
<attr name="interval" type="int">30</attr>
<script>
game.train_variable_x = game.train_variable_x + 1
game.train_current_stop = "train_station_" + game.train_variable_x
msg ("We've arrived at " + game.train_current_stop.alias)
ask ("Do you want to get off?") {
if (result = true) {
player.parent = game.train_current_stop.name
msg ("You get off the train.")
// the below code line's syntax, and~or script name, may be incorrect, as I haven't looked it up, just guessing:
DisableTimer (train_1_timer)
} else if (result = false) {
msg ("You stay on the train, waiting for the next stop.")
}
}
</script>
</timer>
</object>
</object>
<object name="train_station_2">
<inherit name="editor_room" />
<alias>train station 2</alias>
</object>
</asl>KTwiss wrote:I want them to wait say 30 seconds before being able to do something, so are you saying that it isn't possible?
request (Hide, "Command")
SetTimeout (8) {
request (Show, "Command")
}
jaynabonne wrote:To echo Silver's concern, doing nothing for 30 seconds, while perhaps a poor simulation of reality, would not make for an enjoyable *game* experience. In fact, I'd say it's even worse than reality, because while you're riding a subway, you can at least look around, see the outside world going by, watch people, mess with your phone, etc. Being unable to interact with the game for a fixed (and actually quite large) period of time seems like a good reason to walk away from the game. Life is tedious enough without having to live it as well in a game that you're using to escape from life!
You might be better off allowing the player to continue to interact with the game, but just not allow them off the train until the doors open, which would happen after X moves (as opposed to fixed length time).
KTwiss wrote:Pixie,
I feel like you understand I am still super confused as to how to make this time stuff happen what steps do I need to take using which menus and such or do I have to enter the actual code?
train.countdown = train.countdown - 1
if (train.countdown = 0) {
if (exit_train.locked) {
exit_train.locked = false
exit_train.to = second_destination
train.countdown = 10
}
else {
exit_train.locked = true
train.countdown = 3
}
} exit_train.to = exit_train.to.nextstation <enter type="script">
play sound ("TTC Subway Chime Ringtone.mp3", false, false)
msg ("Announcement: Due to track construction the subway will only go as far as St George Station where you can transfer to a shuttle bus to go further east")
EnableTimer (Transportation Time)
Subway Car HP EB.countdown = Subway Car HP EB.countdown - 1
if (Subway Car HP EB.countdown = 3) {
if (exit_Subway Car HP EB.locked) {
exit_Subway Car HP EB.locked = false
exit_Subway Car HP EB.to = St George Station Bloor Danforth Level
Subway Car HP EB.countdown = 10
}
else {
exit_Subway Car HP EB.locked = true
Subway Car HP EB.countdown = 3
}
}
</enter> Subway Car HP EB.countdown = Subway Car HP EB.countdown - 1
if (Subway Car HP EB.countdown = 3) {
if (exit_Subway Car HP EB.locked) {
exit_Subway Car HP EB.locked = false
exit_Subway Car HP EB.to = St George Station Bloor Danforth Level
Subway Car HP EB.countdown = 10
}
else {
exit_Subway Car HP EB.locked = true
Subway Car HP EB.countdown = 3
}
} <enter type="script">
play sound ("TTC Subway Chime Ringtone.mp3", false, false)
msg ("Announcement: Due to track construction the subway will only go as far as St George Station where you can transfer to a shuttle bus to go further east")
EnableTimer (Transportation Time)
</enter>
if (xxx) {
// script1
} else if (xxx) {
// script2
] else if (xxx) {
// script3
] else if (xxx) {
// script4
] else if (xxx) {
// script5
// etc more or less: 'else ifs'
} else {
// script6
}show menu ("What do you want to eat?", split ("apple;banana;other", ";"), false) {
// for the 'show menu' Script, the quest engine automatically (hidden from you) sets: result = your_selected_choice
// conceptually (algebra): game.food = result = your_selected_choice -> game.food = your_selected_choice
game.food = result
if (game.food = "apple") {
msg ("You eat the red apple.")
} else if (game.food = "banana") {
msg ("You eat the yellow banana.")
} else {
msg ("You eat a hamburger.")
}
}(your pasted code)if (exit_Subway Car HP EB.locked) {
exit_Subway Car HP EB.locked = false
exit_Subway Car HP EB.to = St George Station Bloor Danforth Level
Subway Car HP EB.countdown = 10
}
else {
exit_Subway Car HP EB.locked = true
Subway Car HP EB.countdown = 3
}if (exit_Subway Car HP EB.locked) {
exit_Subway Car HP EB.locked = false
exit_Subway Car HP EB.to = St George Station Bloor Danforth Level
Subway Car HP EB.countdown = 10
msg("The doors slide open with a soft hiss.")
}
else {
exit_Subway Car HP EB.locked = true
Subway Car HP EB.countdown = 3
msg("The train doors slide shut.")
}