Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: En-Zar on September 01, 2006, 04:27:33 PM
-
Is there any way to set a variable equal to the statistics of the first member of your party? I know how to do it where you select a specific hero, but I need it to be limted to just the first hero in the party, whoever that may be.
-
Yep, as variables are all-powerful there is a way.
What you need to do is employ what I call "control variables" -- very useful if you have more than four playable characters.
Simply make four variables, named [0001:1st Party Member ID] through to [0004:4th Party Member ID]... every time a character is added or taken away, update the variable.
In case you're wondering, if you remove somebody from third position instead of setting [0003:3rd Party Member ID] to 0, set [0003:3rd Party Member ID] AS [0004:4th Party Member ID], then set [0004:4th Party Member ID] to 0. This can be used safely as if nobody is in the fourth position, it'll be 0 anyway ^^
Then, all you need is fork conditioning to determine who is the 1st Party Member ID, and then to read the statistics from there.
Do away with the Order button on the menu, it messes up this kind of coding :p