Author Topic: LOOK  (Read 7502 times)

0 Members and 1 Guest are viewing this topic.

Offline Ultimate Lex

LOOK
« on: July 20, 2004, 04:29:01 AM »
I went through the tutorial and this came up...if I have this kind of piece in my room:

(if(Said('look>'))
   (if(Said('/door'))
       Print("It's a door.")
   )
   (else
       (if(Said('[ /* , !* ]'))
            Print("You're in the blue room.")
       )
   )
)

Then, if I write "look", I'll get that description, but if I write "look dog", I'll also get that description, so that's not good for that. If I would write that in two Said statements, it would still work the same, so
(if(Said('look'))   takes all the other look statements except for those I have made statements directly for. So, how do I make the game to print different text when entering ONLY "look" than entering "look 'someotherwordthatwasnotdefinedyet'"?



Offline Eigen

Re:LOOK
« Reply #1 on: July 20, 2004, 05:49:20 AM »
 ;)

 (if(Said('/door')) << ".. but if I write "look dog" ...  "


-Eigen
« Last Edit: July 20, 2004, 05:50:09 AM by Eigen »
Artificial Intelligence Competition

Offline Ultimate Lex

Re:LOOK
« Reply #2 on: July 20, 2004, 06:48:41 AM »
;)

 (if(Said('/door')) << ".. but if I write "look dog" ...  "


-Eigen

The point was that when you write "look door" the game will display the text wanted, but when you write SOMETHING ELSE with the look command that still is in the vocabulary, it'll display the same text as when you write JUST "look". Get it?

I'll rephrase: Need help. This is what need:
1) write "look" in room 1, display "This is room1."
2) write "look door" in room 1, display "It's a door."
3) write "look shelf" in room 1, display "It's a shelf."
4) write "look [SOME OTHER WORD THAT STILL IS IN THE VOCABULARY]" display "it's not here."

So, how about now?

Offline Eigen

Re:LOOK
« Reply #3 on: July 20, 2004, 07:38:31 AM »
  (if(Said('look>'))
  (if(Said('/door'))
  Print("It's a door.")
  )
  (if(Said('/man'))
  Print("It's a man.")
  )
  (if(Said('/anyword'))
  Print("It's not here.")
  )
  (if(Said('[ /* , !* ]'))
  Print("You're in the blue room.")
  )
  )


-Eigen
« Last Edit: July 20, 2004, 07:41:53 AM by Eigen »
Artificial Intelligence Competition

Offline RJD

Re:LOOK
« Reply #4 on: July 20, 2004, 07:45:32 AM »
Eh, you beat me to it, Eigen.   ;D
« Last Edit: July 20, 2004, 07:45:51 AM by RJD »
Beep Beep Boo Bop Boo Beep

Offline Ultimate Lex

Re:LOOK
« Reply #5 on: July 20, 2004, 08:11:53 AM »
All right, thanks, got it now.


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

Page created in 0.054 seconds with 22 queries.