Author Topic: Little question.  (Read 5625 times)

0 Members and 1 Guest are viewing this topic.

Offline Eigen

Little question.
« on: July 29, 2002, 06:59:57 AM »
How do I make dialog. I talk to the character and read the dialog. But if I talk to him again it game would say: "You already talked to him" How to accomplish that?


Artificial Intelligence Competition

Offline Brian Provinciano

Re:Little question.
« Reply #1 on: July 29, 2002, 07:39:28 AM »
You would use a simple global variable and an if statement.

in main.sc, define in your local segment:

(local
  ...
  talkedToMan = FALSE
)

then in the room script, have something like this:

(if(Said("talk/man"))
  (if(talkedToMan)
     Print("You already talked to him.")
  )(else
     = talkedToMan TRUE
     Print("Hello there.")
  )
)


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

Page created in 0.047 seconds with 22 queries.