Switch and variable dependent skills

Maxxy_fur

Warper
Member
Joined
Aug 12, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I'd like to be able to set it so a skill either misses/fails or can't be selected at all if switch/variable is set to X. I don't know if I just can't find how to do it or if i need some sort of plugin for it. Please any help will be appreciated its really important to multiple classes and skills in my game.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
switches can't affect skills directly, you either need a plugin or rethink how your game works.


By default, only states can change the available skills by sealing them.


Another method would be to make the damage formula dependent on the switch, but in that case the skill would work (and need to be paid with MP/TP) and only the result would be 0 points.


Other than that, there are several plugins that do allow conditions on skill use - I think yanfly has a few methods to do that and other plugin writers might have something as well.
 

kecleon2

Truly?!
Member
Joined
Aug 6, 2016
Messages
8
Reaction score
8
First Language
English
Primarily Uses
You can use switches and variables in the damage formula. If you want the skill to do nothing if variable 1 is greater than 3 but perform an attack if not, for instance, you could do:


$gameVariables.value(1) > 3 ? 0 : a.atk - b.def


You can also use switches. Let's say that if switch 1 is on, the attack will do 50 damage, but if it's off, it will do 0 damage. Then you could do:


$gameSwitches.value(1) ? 50 : 0


This will change the effects of your attacks based on the values of the switch or variable. You could then set the damage to 0 for one of the possible conditions, which will make the attack do 0 damage if it is true. If you want it to be disabled completely, then that would require a plugin.
 

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,015
Members
137,563
Latest member
MinyakaAeon
Top