Help - Search - Members - Calendar
Full Version: Is there a way to record the number of weapons as a variable?
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
TheBen
Well, the title more or less says it all. Also helpful would be a way to record the number of armors.
Oh, and you can use call scripts if you like.
Ale Goth
When you say record the number of armors, do you mean that when you have, 50 of the armor/weapon in your inventory, the variable will set to 50?
TheBen
Yeah; basically.
Ale Goth
Sorry for the late reply TheBen...

First you need to fix the script Game_Interpreter...go to line 750 where it says
CODE
      actor = $game_actors[@parameters[1]]
      actor = $game_actors[@params[4]]

Change the first line(750) to line 751 or delete the line entirely.
Now that we have that fixed...
You need to make a common event so it can update the armor/weapon in your inventory at all times.
Name Common Event Weapons/Armor.

=Create a wait 30 frames in the beginning to prevent lag. It will update within the second so it shouldn't effect the game at all.
=Create a "Control Variables..." Set The Variable "Weapon" I.E. Iron Sword...to Item In Inventory. It should set the variable to the amount of Iron Swords you have, then do that for all your equipment/weapons. All In that one common event.

Hope that helps...if not tell me and I'll figure it out happy.gif
TheBen
Don't worry about it; I'm a late replier myself. But anyways...
QUOTE
Change the first line(750) to line 751 or delete the line entirely.

What exactly do you mean by that?
Ale Goth
Oh hmm... it means delete the line of code
CODE
      actor = $game_actors[@parameters[1]]


Or change that to...
CODE
actor = $game_actors[@params[1]]


Sorry for the confusion. sweat.gif
TheBen
So... an example would be...
Control Variables: [0001: Club] = [Club] in Inventory
Correct?

(I feel like such a n00b sometimes...)
Ale Goth
Yep, definitely correct. That would set it for the amount of clubs in your inventory. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.