Give Player an item in diolouge?

Started by Krazy, Sat 28/02/2004 10:07:30

Previous topic - Next topic

Krazy

Okay I've been trying out AGS I did a few things and I made a conversation you could have with this man but how do I make it so when certain things are said you are given an item? The code looks like this:
7  // option 7 clicked
BOB: Hmmmm, well you can have this magnifying glass.
BOB: It's pretty childish, and it only has a plastic handel.
TIM: Is that real glass? Or is it just plastic?
BOB: I don't know try smashing it!
BOB: AHAHAHA
TIM: Hysterical
BOB: Actually its missing its lens.
TIM: Then what am I supposed to do with it?
BOB: I'm sure you can find some use for it.
BOB: After all this IS an adventure game.
BOB: You can do all sorts of crazy things.
TIM: Uh huh, thanks.    
BOB: Please don't say that to me.
option-off 7
option-on 8

So what do I ad to this to give the player an item? I've searched everywhere but can't get this to work.
My Stuffs:
Tumblr

Rd27

You have to use add-inv command. Like this:

7 // option 7 clicked
BOB: Hmmmm, well you can have this magnifying glass.
BOB: It's pretty childish, and it only has a plastic handel.
TIM: Is that real glass? Or is it just plastic?
BOB: I don't know try smashing it!
BOB: AHAHAHA
TIM: Hysterical
BOB: Actually its missing its lens.
TIM: Then what am I supposed to do with it?
BOB: I'm sure you can find some use for it.
BOB: After all this IS an adventure game.
BOB: You can do all sorts of crazy things.
TIM: Uh huh, thanks.
BOB: Please don't say that to me.
add-inv x
option-off 7
option-on 8

Just put the number of inventory item  for the place where I put x.
Check out also the help file that comes with AGS. There is a chapter that tells those script commands that can be used in dialoque.

Krazy

My Stuffs:
Tumblr

SMF spam blocked by CleanTalk