Equipment that allows for altering script variables?

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
This might be in the wrong section, i'm not sure.

Let's say one of my scripts has a class/module where default variables amounts are held. (you know, where a user would customize the values in an editable region of the script)  Is there any known way or method to have equipments alter a scripted variable (from a class or a module) as long as it is worn?

For example I have $game_timer.start(time) being used, time being a variable valued at 600  (10 seconds) at the start of my game. If I were to equip a special accessory, time would equal 900 instead (15 seconds) until that equip is taken off. (Changing it back to 600)

Then I would also like to do the same but for a custom script that uses a module as described in the first part.

Edit 1: I stumbled upon this thread, gonna try it and see what I can manage. If anyone has other solutions in the meantime, don't hesitate to post.

http://www.rpgmakervxace.net/topic/2531-armor-kind-assigned-to-variable/
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
One option would be to use the following script:


http://himeworks.wordpress.com/2013/06/06/common-equip-events/


Then have the common events run on equipping check what is equipped and change the variables accordingly.


the other option (with a much higher chance of lag) would be to have a parrallel process check the equipment every second or so. But I would recommend that only if you have incompatibilities with the script.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
One option would be to use the following script:

http://himeworks.wordpress.com/2013/06/06/common-equip-events/

Then have the common events run on equipping check what is equipped and change the variables accordingly.
This managed to do the trick for both situations, along with some custom variable work/script editing of my own.  I successfully created two accessories, one that extends Game_Timer calling that works via variable, and one that changes a scripted variable for MOG's Combo Count. (Changing how long the combo + effects ( a custom state add of mine) stay displayed on the screen)  These are kinda like passive effects to help players who need more time choosing battle commands for my custom system. (To help out noobies at the exchange of one accessory slot)

This thread can be locked.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top