Im sure there is probably a good tutorial for this somewhere but i couldnt find it. Im trying to make a quest where you have to go out and gather 5 plasmas from slimes and bring them back to a guy to get the reward. I know i need a variable im just not sure how to get it to work. Im sorry if this is a totally dumb question.
Multi-item
Game Mechanics DesignYou can do it a simple way of making several event pages like
EventPage A
Condional Branch=
OH YOU HAVE SLIME? THANKS BRO
Slime -1
Variable +1
Self Switch B = ON
EventPage B
Condional Branch=
OH YOU HAVE ANOTHER SLIME? THANKS SIS
Slime -1
Variable +1
Self Switch C = ON
etc
EventPage A
Condional Branch=
OH YOU HAVE SLIME? THANKS BRO
Slime -1
Variable +1
Self Switch B = ON
EventPage B
Condional Branch=
OH YOU HAVE ANOTHER SLIME? THANKS SIS
Slime -1
Variable +1
Self Switch C = ON
etc
Follow the link in my signature, it will list several tutorials. The one you want most is the "Variables Guide".
Do you want them to be able to bring them back to him one at a time? Or to have him send you away until you've got all 5?
If the first, when he asks you for slimes, set a variable to 0. Each time you talk to him, see if you have a slime in your inventory. If you do, use Control Variables to determine how many slimes you have. Then add that to the variable you're using to count, and remove them from inventory. Then do a conditional branch to see if the variable is 5 or more.
If the second, when you talk to him, use Control Variables to determine how many slimes you have in your inventory. Then do a conditional branch to see if that variable is 5 or more. If it is, remove 5 slimes from inventory and turn on a self switch (if it's ONLY the NPC event that will be changed) or a regular switch (if you want to change the NPC event along with others when you have enough slimes).
If the first, when he asks you for slimes, set a variable to 0. Each time you talk to him, see if you have a slime in your inventory. If you do, use Control Variables to determine how many slimes you have. Then add that to the variable you're using to count, and remove them from inventory. Then do a conditional branch to see if the variable is 5 or more.
If the second, when you talk to him, use Control Variables to determine how many slimes you have in your inventory. Then do a conditional branch to see if that variable is 5 or more. If it is, remove 5 slimes from inventory and turn on a self switch (if it's ONLY the NPC event that will be changed) or a regular switch (if you want to change the NPC event along with others when you have enough slimes).
I did this. That helped SO MUCH! My quest is working perfectly and ive started using a lot more variables in my game. Thank you guys soomuch for the help. 😀
Original thread: https://forums.rpgmakerweb.com/threads/multi-item.38846/