Hi folks, let's say I wanted to write a script that does the following: add a Sword to the FPC inventory and equip it directly when pressing the button "L". The script is attached to the player.
How can I get the Sword item without having to assign it in the editor? I would like to get an item without assigning it in a serialized field in the editor. I just want to grab it from the ItemDatabase.
inventory.PickupItemType(m_ItemType, m_Count, -1, true, false);
But how to specify ItemType in the script?
I tried something like ItemCollection.ItemTypes[number] but nothing works. What's the correct way to do that?
Help would be much appreciated.
How can I get the Sword item without having to assign it in the editor? I would like to get an item without assigning it in a serialized field in the editor. I just want to grab it from the ItemDatabase.
inventory.PickupItemType(m_ItemType, m_Count, -1, true, false);
But how to specify ItemType in the script?
I tried something like ItemCollection.ItemTypes[number] but nothing works. What's the correct way to do that?
Help would be much appreciated.