Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Responses  (Read 3572 times)

0 Members and 1 Guest are viewing this topic.

FinnishBoy

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 28
  • Mwah-hah-hahhh!
    • View Profile
Responses
« on: June 07, 2004, 08:29:11 PM »

What script I need when I have to add new response, for example like this:

1. In conversation between actor and entity, entity tells he wants some ice cream.
2. Actor get some ice cream and go back to entity (ice cream is now in inventory).
3. Now game has added response "Here is your ice cream". Response is there only if "ice cream" is in inventory.

Is conditional statement "if" right way, or what?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Responses
« Reply #1 on: June 07, 2004, 08:34:59 PM »

Yes, that's the way to go. Your code will look something like this:

...
Game.AddResponse(1, "Blah");
Game.AddResponse(2, "Bleh");

if(actor.HasItem("IceCream")) Game.AddResponse(3, "Here is your ice cream");
...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

FinnishBoy

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 28
  • Mwah-hah-hahhh!
    • View Profile
Re: Responses
« Reply #2 on: June 07, 2004, 08:40:05 PM »

Thanks, Mnemonic
Logged
 

Page created in 0.033 seconds with 19 queries.