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
36,730
Reaction score
9,883
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!
 

Latest Threads

Latest Profile Posts

Here is an work in progress (unfinished as of now) Music Album i'm making:


The songs are entirely made with this site:


Please tell me what you think about each song!
The game's already out there. Now what?
It has now gotten to the point where I need detailed excel spreadsheets to track where every individual enemy on the map is, what type of enemy they are and how many rooms you need to pass through to make them respawn.

I'm simultaneously proud of my diligence and would never wish this torture on even my worst enemies. :kaoswt2:
Variation two of my nameless protagonist- now with color!!
WIN_20220815_21_48_46_Pro.jpg
thoughts?

Forum statistics

Threads
124,573
Messages
1,164,491
Members
163,398
Latest member
ranisowmya
Top