How to know if character has the object?

Started by Meny, Sun 06/01/2008 11:56:35

Previous topic - Next topic

Meny

I remember that I saw the option to make - if the character have object one do that and that, I search the manual and didn't find. It is exist? Could you direct me where in the manual it written?

Thanks!

Galen

Use:

if(player.InventoryQuantity[iwhateveritemyouwanttouse.ID]==1)
{
code to execute
}

The .ID may be redundant, but it should work.

Dualnames

Quote from: Meny on Sun 06/01/2008 11:56:35
I remember that I saw the option to make - if the character have object one do that and that, I search the manual and didn't find. It is exist? Could you direct me where in the manual it written?

Thanks!

This makes little sense... if someone understands tell me.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Galen

He wants an action to be performed if the player has a specific item. Hence the code I provided.

SMF spam blocked by CleanTalk