I want to ask you all, can I make an event where a npc asks for food and player can give any edible/eatable item from their inventory?
And whatever it is will disapper by one in their inventory. Thank you before.
yes, but you need to check and decide the result manually.
If all food items are key items, let the player select key item in the event, then check the variable that will return the item ID if that item is food in your game.
If yes, reduce the item number - if not show text "that is not food"
Umm, can you explain it in the app? I don't quite understand.
Btw, is there any way for player to use that food item after we change it to key items? also, can I remove hp bar if I'm using that food item?
Yes, I am a newbie. The point that I don't understand is how to make conditional branch to check if there are any 'food' in inventory (whatever it is and food item not only one). If I change food as key item, then how to add it on conditional branch?
All items are defined by their ID - that is the number to the left of the name in the database.
In all cases, when the player selects something, you get the ID number of that item - and then you have to check the number yourself.
If the player selected item #23, then the variable from select key item will contain the number 23.
After the selection, you have to make a series of conditional branches, checking each possible number.
The event will execute the commands where the number is correct - and YOU have to tell it what those commands are, because the engine doesn't know what "food" is.
So if item#1 is food, process it.
If item #2 is a scroll, show text "I can't eat scrolls"
if item #3 is ...
if item#23 is food, process it.
and so forth.
If you don't know how to use variables, I suggest the "Variables Guide", one of the tutorials linked in my starting point.
So, I have to make conditional branches as much as item that I have in my game?
If yes, what should I do to make a variable contain item id?
If no, I think I'm still don't understand. I know how to use variable for standard use, but not this.
Please forgive me if I anger you because of my stupid brain. 🙁
I understand! Thank you for your great help and fast answer. Now, I can continue my project!