Note that if you do
Code: ags
the condition will only be true if the character has exactly one inv item 18.
So if you picked up inv item 18 two times or more, the following code won't be executed.
To be on the safe side, do it like this:
Code: ags
if (character[GetPlayerCharacter()].inv[18] == 1) { // if player character has EXACTLY ONE inv item 18
the condition will only be true if the character has exactly one inv item 18.
So if you picked up inv item 18 two times or more, the following code won't be executed.
To be on the safe side, do it like this:
if (character[GetPlayerCharacter()].inv[18]) { // if player character has ONE OR MORE of inv item 18