Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: FinalSin on Wed 12/11/2003 18:43:12

Title: Addinventoy in Dialogs
Post by: FinalSin on Wed 12/11/2003 18:43:12
Okay, now bear in mind I'm a beginner. I want to give the player inventory item 5 once he has finished Dialog Topic 2. But I don't seem to be able to - it won't accept
AddInventory (5)
Addinventory(5)
add-inventory 5

Any ideas?
Title: Re:Addinventoy in Dialogs
Post by: Ginny on Wed 12/11/2003 20:12:45
well, either: add-inventory 5 , or if this is something I dreamt, use run script X (like 2 or something) and put AddInventory(5); in the dialog_request global function after using an if statement : if (blah == 2) AddInventory(5);

:)
Title: Re:Addinventoy in Dialogs
Post by: Ishmael on Thu 13/11/2003 19:40:41
add-inventory 5

it's in the manual. R-T-F-it!
Title: Re:Addinventoy in Dialogs
Post by: FinalSin on Sat 15/11/2003 09:50:07
Mr. TK, I'd like you to re-read my post. Typing in add-inventory 5 does not work in a dialog screen. And I am unable to find any reference to it in the manual. That was why I asked.

add-inventory is not recognised. Any ideas?
Title: Re:Addinventoy in Dialogs
Post by: Ishmael on Sat 15/11/2003 10:44:31
Let me put it this way:

add-inv X
Adds inventory item X to the current player's inventory. This does the same thing as the AddInventory text script command, but is provided here because it is frequently used in dialogs.

RTFM! It's the first command documented of dialog script commands.

Ok, I was wrong, I admit it, I was confused by your post. After having a look at the Manual, I now know you shuold use "inv" instead of "inventory". I have had no need for this command yet in my games, or atleast not in a long time, and my memore is not perfect.
Title: Re:Addinventoy in Dialogs
Post by: FinalSin on Sun 16/11/2003 18:48:15
Just as long as everyone's happy  :D
Title: New Problem
Post by: FinalSin on Mon 17/11/2003 13:19:01
add-inv 5 doesn't work. it won't accept add-inv. It also suggest AddInventory when I type 'add' but won't actually accept its own suggestion. Has the world gone mad?
Title: Re:Addinventoy in Dialogs
Post by: Ginny on Mon 17/11/2003 13:52:55
Well, it's in the manual allright (add-inv X) and it should work. Make sure you're putting the add-inv 5 or whatever one line down right after the text the char says, in the correct option.
The dialog editor does suggest other non-dialog functions, but you can't use them in dialogs.

If all else fails, you can alwyas use run-script.