Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: barefoot on Mon 30/11/2009 12:01:18

Title: Add Inventory from diolog options
Post by: barefoot on Mon 30/11/2009 12:01:18
Hi

I need a bit of help with adding an inv item to player if he selects to buy from within Diolog, i may be missing a parameter, not sure:

@2
cRedpants: I'll take it
cDeath: Good choice Sir
cRedpants.AddInventory(iKey);
stop

@3
cRedpants: No thanks
cDeath: Your decision Sir
stop

Thanks

Barefoot
Title: Re: Add Inventory from diolog options
Post by: Gilbert on Mon 30/11/2009 12:05:35
I haven't checked yet, but when you want to execute script lines from a dialogue you must put a space before these lines, so:

@2
cRedpants: I'll take it
cDeath: Good choice Sir
cRedpants.AddInventory(iKey);
stop

@3
cRedpants: No thanks
cDeath: Your decision Sir
stop
Title: Re: Add Inventory from diolog options
Post by: barefoot on Mon 30/11/2009 12:09:50
Thanks so much Gilbet

works a treat... must remember about the spaces..

cheers
barefoot