Common event in battle problem...

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
31,365
Reaction score
7,675
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
24
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!
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top