Yet another question.
Anonymous
13 Feb 2004, 05:50I apologize if all these questions I am asking is getting annoying but here I go again.
Is there any way to have a conditional so that a script would run if an object is in a certain room that is not the current room or the inventory.
Is there any way to have a conditional so that a script would run if an object is in a certain room that is not the current room or the inventory.
MaDbRiT
13 Feb 2004, 08:12Mman wrote,
No need to apologise for asking questions here, that's (basically) what the forums are for!
Yes.
Oh, you want to know how I suppose!
You would test for an object's location with something like:
When to actually MAKE the test is more a question of what you are trying to do as a result of it. If you want it tested repeatedly throughout the game, I'd put it in the game's 'afterturn' script.
Hope this helps
Al (MaDbRiT)
I apologize if all these questions I am asking is getting annoying but here I go again.
No need to apologise for asking questions here, that's (basically) what the forums are for!
Is there any way to have a conditional so that a script would run if an object is in a certain room that is not the current room or the inventory.
Yes.
Oh, you want to know how I suppose!
You would test for an object's location with something like:
if ($locationof(object)$ = bathroom) then {
put the script here
}
When to actually MAKE the test is more a question of what you are trying to do as a result of it. If you want it tested repeatedly throughout the game, I'd put it in the game's 'afterturn' script.
Hope this helps
Al (MaDbRiT)
Anonymous
13 Feb 2004, 19:18Thank you. Not only does that solve my current problem, but I think I am finally starting to understand functions.