Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mchammer on Fri 07/09/2007 15:19:25

Title: Changing int/short to inventory item's Script name SOLVED
Post by: mchammer on Fri 07/09/2007 15:19:25
Hi  :)

Im trying to change player's activeinventory and the problem is that i have the new activeinventory value in a integer variable. It seems to me that activeinventory function accepts only inventory items' script names and using script names would mean loads of extra scripting for me.
  So is there any command that changes a number value to script name, like ID property backwards?
Or is there any other way to do it?
Title: Re: Changing int/short to inventory item's Script name
Post by: GarageGothic on Fri 07/09/2007 16:13:18
player.ActiveInventory = inventory[activeinventory];

Where activeinventory is the name of your int/short.
Title: Re: Changing int/short to inventory item's Script name
Post by: mchammer on Fri 07/09/2007 20:18:46
Oh.. so simple.
Thank you  :)