A script that activates a common event immediately after an actor or enemy lands a critical hit.

Koudelka

Regular
Regular
Joined
Oct 29, 2019
Messages
83
Reaction score
4
First Language
Portuguese
Primarily Uses
RMVXA

kyonides

Reforged is laughable
Regular
Joined
Nov 17, 2019
Messages
1,752
Reaction score
890
First Language
English
Primarily Uses
RMXP
EDITED / Expanded

Ruby:
# * CriticalAlert ACE * #
#   Scripter : Kyonides Arkanthes
#   2023-06-06

# This scriptlet focuses on the attacker aka spellcaster.

module CriticalAlert
  ACTOR_COMMON_EVENT_ID = 1
  ENEMY_COMMON_EVENT_ID = 2
end

class Game_Battler
  alias :kyon_critical_alert_gm_bltr_exec_dmg :execute_damage
  def execute_damage(user)
    kyon_critical_alert_gm_bltr_exec_dmg(user)
    critical_hit_reserve_common_event(user)
  end

  def critical_hit_reserve_common_event(user)
    return unless @result.critical
    if user.actor?
      event_id = CriticalAlert::ACTOR_COMMON_EVENT_ID
    else
      event_id = CriticalAlert::ENEMY_COMMON_EVENT_ID
    end
    $game_temp.reserve_common_event(event_id)
  end
end
 
Last edited:

Koudelka

Regular
Regular
Joined
Oct 29, 2019
Messages
83
Reaction score
4
First Language
Portuguese
Primarily Uses
RMVXA
EDITED / Expanded

Ruby:
# * CriticalAlert ACE * #
#   Scripter : Kyonides Arkanthes
#   2023-06-06

module CriticalAlert
  ACTOR_COMMON_EVENT_ID = 1
  ENEMY_COMMON_EVENT_ID = 2
end

class Game_Battler
  alias :kyon_critical_alert_gm_bltr_exec_dmg :execute_damage
  def execute_damage(user)
    kyon_critical_alert_gm_bltr_exec_dmg(user)
    critical_hit_reserve_common_event(user)
  end

  def critical_hit_reserve_common_event(user)
    return unless @result.critical
    if user.actor?
      event_id = CriticalAlert::ACTOR_COMMON_EVENT_ID
    else
      event_id = CriticalAlert::ENEMY_COMMON_EVENT_ID
    end
    $game_temp.reserve_common_event(event_id)
  end
end
THANK YOU! You saved my day and helped my game being more fun right now.
 

kyonides

Reforged is laughable
Regular
Joined
Nov 17, 2019
Messages
1,752
Reaction score
890
First Language
English
Primarily Uses
RMXP
I had to add the following warning:

This scriptlet focuses on the attacker aka spellcaster.
 

Latest Threads

Latest Posts

Latest Profile Posts

Eliza-sprite-v2.png

New sprite for Eliza. On the positive side she looks really pretty now. On the negative side she's a giant so I would need to redo the tileset if I want to use this sprite and probably need a plugin to not make her sprite look akward on the save file... so if anyone got some tips how to deal with large sprites in mv please do let me know.
Using Avery's icon list I made a balloon icon of a sleeping person in a bed. That way when you can use a Inn it will appear over the innkeeper's head. If I use the 'zzz' balloon it looks like it is saying the Innkeeper is asleep.
Presenting the minigame nobody asked for, yet everybody needs in their life - I mean, I'm assuming. It's pretty funny. To me, at least.
Watermelon hunting!
Watermelon.png
You find watermelon hidden around a town and smash them to pieces! You get watermelon slices - and sometimes rare ones appear that have been stuffed with items! :kaopride:It's got a great music track too
Art Tutorials be like.
BeforeAfter.png
I've got a font working + some temporary face sets for the characters. I still need to change the window box though but I'll do that later.

Forum statistics

Threads
134,776
Messages
1,250,497
Members
177,551
Latest member
cat1234
Top