Add Inventory from diolog options

Started by barefoot, Mon 30/11/2009 12:01:18

Previous topic - Next topic

barefoot

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
I May Not Be Perfect but I Have A Big Heart ..

Gilbert

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:
Code: ags

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

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

barefoot

Thanks so much Gilbet

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

cheers
barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk