EVENT ITEM EXCHANGE OF MULTIPLE ITEMS AT A TIME
Posts
Pages:
1
I am trying to make an event quest where as you defeat creatures, you can collect proof of their defeat (ie trophy) and bring it back to exchange for money. I figured out how to make the event ask for 1 item, but how do you make it so that the player can opt to trade in more than one. For example, if the Player Character comes back with 25 trophies, he should have the option to trade all 25 instead of doing it one at a time.
Thanks!
Thanks!
You can use a variable for this. So, you make a variable to count the amount of items in question, then reference it.
Something like...
Basically you're checking to see how many lion heads are in your items and setting a variable to that amount. Then reference the amount in the message or choice box. After that you can take all the items or just one, using the variable, and give the gold, also using the variable. Easy.
Something like...

Basically you're checking to see how many lion heads are in your items and setting a variable to that amount. Then reference the amount in the message or choice box. After that you can take all the items or just one, using the variable, and give the gold, also using the variable. Easy.
Thank you! Is it possible to post images of what/how you are entering the information for the two Control Variables sections? I keep getting errors and I am very new to RPG Maker.
Thank you! Is it possible to post images of what/how you are entering the information for the two Control Variables sections? I keep getting errors and I am very new to RPG Maker.
Ashram: What errors are you getting? The code Liberty gave doesn't seem to have any room for errors...
Also, the entering of information is handled by the Control Variables function. As seen here, the first 'Control Variables' Sets the value of variable 'Count Items' to the number of 'Lion Head's you have in your inventory. The second one uses the value of 'Count Items' and multiplies it by 100 (which is the price of each individual 'Lion Head').
So...
Count Items = number of Lion Head in the player's inventory
Then, if the player chooses 'Give All Lion Head'...
Count Items = Count Items * Price of each Lion Head
Hope that cleared it up.
Also, the entering of information is handled by the Control Variables function. As seen here, the first 'Control Variables' Sets the value of variable 'Count Items' to the number of 'Lion Head's you have in your inventory. The second one uses the value of 'Count Items' and multiplies it by 100 (which is the price of each individual 'Lion Head').
So...
Count Items = number of Lion Head in the player's inventory
Then, if the player chooses 'Give All Lion Head'...
Count Items = Count Items * Price of each Lion Head
Hope that cleared it up.
Ok I got it to work now. I apologize, I am so new I wasn't sure what I was doing with regards to entering in that information in the count items section. Here is a follow up question though. Is it possible to somehow include text that is based on the Count Items*price of each Lion Head? IE your vendor says something like:
"You gained XGold" where X is based on how many Lion's Heads you traded.
"You gained XGold" where X is based on how many Lion's Heads you traded.
You use this:Where 'n' is the ID of the variable.
Example: We have a variable named 'Gold Gained', and its ID is 12.
To display that value in a message box, you use:The value of 'Gold Gained' will then replace the \V{12}.
So, if the value of the said variable is, say 100. The output will become:
"You gained 100 gold!"
There are actually more of these control characters. You can see all of them by hovering your mouse over the 'Show Text' entry box.
\V[n]
Example: We have a variable named 'Gold Gained', and its ID is 12.
To display that value in a message box, you use:
You gained \V[12] gold!
So, if the value of the said variable is, say 100. The output will become:
"You gained 100 gold!"
There are actually more of these control characters. You can see all of them by hovering your mouse over the 'Show Text' entry box.
Pages:
1















