If you press F9 during the game to open the switches and variables debug menu, you can see that the variable will accurately reflect how many chickens you have caught: Then go ahead and give your game a test play try to gather up all the chickens. Go ahead: paste a few copies of the chicken event. Remember that we used a self switch to hide the chicken after it’s caught? We did this so that we can copy and paste the chicken event as many times as we want without having to edit every one. Remember that by default, the value of every variable is zero. This means that whenever the player runs over the chicken, the event will add 1 to the value of the “Chickens Caught” variable. When you OK back out, your event contents should look like this: For our example, simply choose a constant number of one. You can define a specific number with “Constant”, or you can pull numbers from other variables, random numbers, or from game data. The “Operand” section is where you define what number you want to manipulate the variable with. For our example, we want to select the “Add” operation (the other options are other mathematical operations: subtraction, multiplication, division and mod/remainder). The first option, “Set”, will directly set the variable to the number of your choice. The “Operation” section gives you a choice of how you want to manipulate the variable. In this tutorial, the variable 001, “Chickens Caught”, will keep track of the amount of chickens that the player has picked up. I briefly explained in the first part of the tutorial that a variable is a number: when you modify a variable in this window, you will be manipulating the number that is store into at variable. For our example, I’m going to give the variable a suitable name, and then OK back to the “Control Variables” window. The variable list is the same as the switch list that we looked at in part one. If you click on the “…” icon, you’ll see another familiar window: The top part should be familiar: you can choose to modify a single variable of a range of them.
This is similar to how you set up a switch before, but you’ll notice that the “Control Variables” window is a lot more complicated: In the “Game Progression” command category, select “Control Variables”. On the first page, insert a new event command on the line before the self switch is activated. In order to do this, we can use a variable. Now, in order to turn this chicken into a minigame, we’re going to need a way to keep track of many chickens the player has caught. of the event is blank, and it is activated by the self switch. In this case, we use a self switch to make the chicken disappear when the player touches it. The first page is the chicken itself-when the player walks on top of the chicken (note that the priority it set to “Below Characters” and the trigger is set to “Player Touch”), the chicken will disappear. The event right now has a simple two-page setup.
#Rpg maker xv ace variable track when weakpoint is hit full
(click the image for a full view with animation) We’ll start by setting up the chicken event: In this tutorial, we’re going to create a minigame where the player must collect chickens, and we are going to use a variable to keep track of how many chickens he has picked up.
If you haven’t read part one, check it out now, because this tutorial builds off of the elements introduced there. In this part of the tutorial, we’re going to expand on that knowledge by using variables.
We used switches and self switches, and learned about event pages and their conditions. The previous tutorial explained what switches and variables are, and then we walked through the creation of a treasure chest event. Howdy! Uncle Despain here, with the second part of my tutorial on RPG Maker VX Ace’s switch and variable functions.