Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -

Post new topic Reply to topic  [ 3 posts ] 
  Fri May 09, 2008 5:10 am
User avatar

Self Variables
Version 1.0
By: DrakoShade

What it Does
This script adds Self-Variables (like Self-Switches, but more than two options) to your events.  Treat them like what they are--  a hybrid between Global Variables and Self-Switches.  Each event will only want to look at and modify its own, so you can make a single event that uses @self_variable[1], copy-and-paste it 50 times on 10 different maps, and each one of them will be looking at its very own @self_variable[1], for whatever internal conditional branches or page conditions you told the original to use.

  • Number of self_variables not inherently limited.
  • Easy usage within events.
  • Each event page can use either a Game Variable or a Self Variable as a condition.



For RMXP: Paste above main.
For RMVX: Paste in the Materials section.

To call a specific self_variable from outside the event that owns it, use the following:
Expand to see the code.

For example:
Expand to see the code.
Event 3 on Map 1 would have its self_variable 2 modified by adding 1.  Hopefully, that makes sense.

This script was designed, however, to be made use of from within the event itself.  To call an event's self_variables from the Script command or the Script option of a Conditional Branch, it's much simpler:
Expand to see the code.

Thus, if Event 3 on Map 1 needs to add 1 to its Variable 2, you do this within the event
Expand to see the code.

In order to use a self_variable in place of a game_variable when determining page conditions, simply include the following comment on the page in question:
Expand to see the code.
Unfortunately, you cannot use both types of variable in page conditions.

Not even tested with SDK.  Compatibility doubtful.  For RMXP, not compatible with anything else that alters the refresh method of Game_Event.
For RMVX, not compatible with anything that alters the conditions_met? method of Game_Event.

To Do
  • SDK version of the RMXP script
  • Clean up code
  • Reformat post when I'm more awake.

Parting Comments
Both versions of this script worked through the testing I was able to do.  If errors creep up, please be specific about how you got them, and exactly what error you received.

Give a man a fire, and he's warm for a day...
Set a man on fire, and he's warm for the rest of his life.

Last edited by DrakoShade on Fri May 09, 2008 5:13 am, edited 1 time in total.

Top Top

  Fri May 09, 2008 5:52 am
Support/RGSS Bitch
User avatar
Retired Staff

Location: Kansas City, Mo
Good work DS. I will be sure to post a few suggestions and how you could make this SDK compatible (minor edits) in a bit. Good to see you scripting. :)

I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.


Top Top

  Thu Jan 05, 2012 7:27 pm
User avatar

Edit: Sorry, necropost -_-

Top Top
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: No users and 11 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group