Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: Corby on May 04, 2003, 06:02:56 PM

Title: Dumb Question
Post by: Corby on May 04, 2003, 06:02:56 PM
This is a pretty simple question... what do you type when you want something to occur and have two possible things the player can type do make this happen?
ex) talking to a person will cause a certain to text box to appear. The player can either type "talk to man" or "talk to dave"
so I imagine the code would be something like this:

if(said("talk","man") OR ("talk","dave")){
print("Hello!");

it's the "OR" part i need the code for.
kind of an embarrasing question, but I have to learn sometime.  ::)
Title: Re:Dumb Question
Post by: Chris Cromer on May 04, 2003, 07:43:31 PM
Code: [Select]
if ((said("examine","door") ||
     said("open","door") ||
     said("break","door"))) {
  print("The doors are all securely locked.");
}

This is how you do it.
Title: Re:Dumb Question
Post by: Corby on May 04, 2003, 08:44:23 PM
Thanks Chris.
Title: Re:Dumb Question
Post by: Zero on May 11, 2003, 10:55:31 AM
Ya its a pretty simple code
i like experamenting with codes to see what will happen!!!