Using an attack turns on a switch

GummyHelix

Villager
Member
Joined
Jun 24, 2016
Messages
10
Reaction score
3
First Language
English
Primarily Uses
Hello! I searched the forums and I tried really hard to event it, but I just can't figure it out.


Back in RPG Maker 2003, you had this neat little feature when making an attack:

1r.png



And it could do neat things, like examine your opponent:

2r.png





And I can't, for the life of me, figure out how to do it in VX Ace. It feels like the answer is really obvious, but it's just not to me.


Thank you to anyone who can help!
 

Membou

Villager
Member
Joined
Jul 8, 2016
Messages
19
Reaction score
5
First Language
English
Primarily Uses
There could be a more streamlined way of doing this, but if you go into the "effects" section, you can call a common event. From that common event, you can control switches.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
What @Membou suggested is the most straightforward way; if the skill has a damage formula you can also use the damage formula to turn on a switch; for example: $game_switches[25] = true; a.mat * 4 - b.def * 2 (this has a couple of small advantages over the use of common events)


If you are using a lot of skills that turn on specific switches, Scripting would be the quickest (but most technically difficult) way to do it.
 

GummyHelix

Villager
Member
Joined
Jun 24, 2016
Messages
10
Reaction score
3
First Language
English
Primarily Uses
Common eventing wouldn't work in battle for me, but what Wavelength suggested did work! Thank you so much!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
if your switch is to turn on a parallel process common event, then no, they don't run in battle.  This is the reason you can use the Effects box to allocate a common event to a skill.  It is called directly, rather than relying on parallel processing (which isn't active in battles), but it is called at the end of the attack, so not so good for things you want to happen before or during an attack.
 

Membou

Villager
Member
Joined
Jul 8, 2016
Messages
19
Reaction score
5
First Language
English
Primarily Uses
@Shaz, Thanks for the clarification there. I'm sorry if this seems needy, but could you give me an example of what sort of thing you would want to use a common event for in the effects section? (nothing in-depth, but just an idea of when it would be more appropriate)


I know that's really broad but I'm just trying to learn more and become more versatile in the program, and a reason why I've been jumping into this section to answer any questions to the best of my ability, even if eventually someone else has a more precise answer.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
If you want to perform some other actions after you use a skill or an item, that can't be done in the damage formula
 

Membou

Villager
Member
Joined
Jul 8, 2016
Messages
19
Reaction score
5
First Language
English
Primarily Uses
Okay, so basically dealing with the timing of the action, got it. Thanks!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
Let's say you have an actor, and every time they use a certain skill you want to increase a variable, and when it hits a certain value, you want them to upgrade the skill.


Your common event would be to add 1 to a variable, followed by a conditional branch to see if the variable is a certain number, and if it is, remove that skill and add a new one.  You then attach this common event to the original skill in the Effects panel, and those few commands will be run every time the actor uses that skill in battle.


That's just one simple example.  There are heaps of things you could do.  The above COULD be done in the damage formula, but it would be long-winded and not something you'd want to try if you knew nothing about scripting.  There could also be plugins that would do this sort of stuff too, and you might go with one of those if you wanted to do it quite a bit.  But it's an example of one thing you could do with common events on skills.
 

Membou

Villager
Member
Joined
Jul 8, 2016
Messages
19
Reaction score
5
First Language
English
Primarily Uses
Let's say you have an actor, and every time they use a certain skill you want to increase a variable, and when it hits a certain value, you want them to upgrade the skill.


Your common event would be to add 1 to a variable, followed by a conditional branch to see if the variable is a certain number, and if it is, remove that skill and add a new one.  You then attach this common event to the original skill in the Effects panel, and those few commands will be run every time the actor uses that skill in battle.


That's just one simple example.  There are heaps of things you could do.  The above COULD be done in the damage formula, but it would be long-winded and not something you'd want to try if you knew nothing about scripting.  There could also be plugins that would do this sort of stuff too, and you might go with one of those if you wanted to do it quite a bit.  But it's an example of one thing you could do with common events on skills.
Okay, great! That definitely gets the wheels turning, and helps distinguish between the two methods. Thanks for going above and beyond on that. :D
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top