Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Variable Question
« previous
next »
Print
Pages: [
1
]
Author
Topic: Variable Question (Read 1349 times)
En-Zar
Gonk!
Initiate
Posts: 6
Variable Question
«
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.
Logged
Raen Ryong
Skyrunner of Dragonia
Associate
Posts: 130
Raen Ryong... Skyrunner. Dragonic Soveriegn entity...
(No subject)
«
Reply #1 on:
September 01, 2006, 04:35:59 PM »
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
Logged
Raen Ryong...
Skyrunner of Dragonia...
Guardian of all worlds...
Hoard and covet not, but be brave and free. Quest always after knowledge and slowly learn to know what science cannot see. Seek and strive for learning, be temperate and wise, for skill and wisdom only will help us to survive.
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Variable Question