Changing name of inventory item

Started by SN1984jm, Sun 20/12/2009 19:15:19

Previous topic - Next topic

SN1984jm

Say I want to name an item "unknown object" until the player has explored something somewhere in the game. After achieving this certain exploration, the name of the item should change to what it actually is.

Is this possible, since i did read in the manual: "It is not currently possible to change the name of an object at run-time". I saw this at "Object.Name".

Maybe they mean something else than what I want to achieve.

I was thinking about replacing the "unknown object" with a new object, which to the player looks exactly the same, but is actually another object in the script.
I was hoping there was a better way though.
Any ideas?

Calin Leafshade

the best way to do this is to just replace the inventory item with a different item..

so you have one that is "unknown" and then the other one and just lose one and get the other.

Crimson Wizard

Do you want to replace a name of an Object or an Inventory Item? Because these are different things.

For inventory item you can change InventoryItem.Name.

As for object, I guess, you'll have to make 2 objects with different names, at the beginning an object with known name should be disabled (invisible), when player completes necessary investigation turn visibility for "unknown object" off and to the one with specified name - on.

Calin Leafshade

sorry i didnt know you could change inventory item names at runtime :p

SN1984jm

Ah, great. Changing the inventory name did the trick! That's what I needed.

SMF spam blocked by CleanTalk