tereineus

Villager
Member
Joined
May 30, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
N/A
hi i was looking for the answer on the net and in the forum, but i can find it...
the question is:

how do you stop a common event from happening if the enemy misses the attack
example:

Goblin uses triple slash and this attack has a common event that will destroy the helmet of the hero, BUT if he misses, the event shouldn't ocurr, but that doesn't happen.

the attack call the common event even if he misses, how do i stop that?

i hope you can understand my pseudo english thanks!
 

BrandedTales

StoryTeller
Veteran
Joined
Dec 30, 2016
Messages
203
Reaction score
116
First Language
English
Primarily Uses
N/A
My game doesn't use the battle system, so I'm purely guessing from a logical concept...

Could you run an event before the goblin's turn to record the hp each party member before the goblin's action? Then after the action, check the hp values, and if it is less, execute destroy helmet?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,039
Reaction score
10,033
First Language
German
Primarily Uses
RMMV
the common event and the skill effects are independently of each other, you need to manually add your own check.

Easiest way is probably to add a damage formula command to turn on a switch (damage formula is executed on hit only), and check that switvch in the common event. However, you need to remember to turn off the switch or it will always execute on next skill use.
 

Kyo Panda

Veteran
Veteran
Joined
May 16, 2017
Messages
34
Reaction score
25
First Language
Portuguese
Primarily Uses
RMMV
From Andar's answer, the formula would be something like this for the Switch with ID 1:

Code:
$gameSwitches.setValue(1, true); a.atk * 4 - b.def * 2
 

tereineus

Villager
Member
Joined
May 30, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
N/A
thanks i will try that :D
 

tereineus

Villager
Member
Joined
May 30, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
N/A
it worked! thanks to all!
 

Latest Threads

Latest Posts

Latest Profile Posts

By far, the weirdest flex I've ever seen on the internet is "I don't have the attention span to read what you wrote, but I REALLY want the world to know I don't have that attention span!".
Why... the FACK... do I work in customer service?!?!
Excuse me while I go question allllll my life choices.
DamageEvil_6.png added!
index.php

Sometimes I wonder why I still try and recruit others to help with my games. It never works.

Forum statistics

Threads
125,777
Messages
1,173,418
Members
164,930
Latest member
alantangyl
Top