HasInventory in negative way (Solved)

Started by Volcan, Wed 28/11/2012 21:13:41

Previous topic - Next topic

Volcan

How to tell if the player does not have an item?

if Not(player.HasInventory(iKey)){
DisplayAtY(TY, "There's a key in the drawer.");
}   

Crimson Wizard

#1
By using "not" operator ('!'):

Code: ags

if (!player.HasInventory(iKey)){
 DisplayAtY(TY, "There's a key in the drawer.");
}   


More info: http://www.adventuregamestudio.co.uk/wiki/?title=Script_language_keywords#Operators

Volcan


SMF spam blocked by CleanTalk