Author Topic: Dumb Question  (Read 1582 times)

0 Members and 1 Guest are viewing this topic.

Offline Corby

Dumb Question
« 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.  ::)
« Last Edit: May 04, 2003, 06:03:47 PM by Corby »



Offline Chris Cromer

Re:Dumb Question
« Reply #1 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.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Corby

Re:Dumb Question
« Reply #2 on: May 04, 2003, 08:44:23 PM »
Thanks Chris.

Offline Zero

Re:Dumb Question
« Reply #3 on: May 11, 2003, 10:55:31 AM »
Ya its a pretty simple code
i like experamenting with codes to see what will happen!!!
Zero has just programmed a post please read.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.046 seconds with 21 queries.