Ok I there was this part I wanted to put in the game that a message would be displayed and if the player had an inventory item, another message after that. If the player did not have it, a different message would show. I did the part if the player had the item (using a condition if player had inventory item), but I didn't know how to do the part to show the message if he did not have it. I know my question is kind of confusing, but I newly got ags 2.55 and I needed help
youll need a conditional "if" statement, plus a global integer "global int" to store and check to see if the player has the inventory item. youll probably also need a custom function to call to in order to check whether or not the person has the item.
Check this out in the manual:
GetGlobalInt
GetGlobalInt (int index)
Returns the value of global variable INDEX.
Example:
if (GetGlobalInt(20)==1);
{ code here }
will execute the code only if Global Integer 20 is 1.
See Also: SetGlobalInt, GetGlobalString