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,775
Reaction score
893
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,775
Reaction score
893
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

Me: "Who the heck would play a game with no stakes, no enemies, and all you do is raise and breed bees?"
Later after playing it. - "Holy crap, I didn't know it was 1:30. Where'd my time go?"
The site is being slow and funky again. IS SOMEONE CRAFTING POEMS?!
So yeah, @TRIDIUM @TESTOSTERONE, I wuz like, "What do they mean by borderline and boundaries?"

And then, y'all know this girl?

actress1.png

alice_bikini.png

The clothes? They're just a, um, quick edit. :kaoswt:
I've uploaded the opening cutscene from my game to my channel. It basically introduces us to the first three characters, and what their relationships are:
Cosmic Inferno: Opening dialogue
I don't want to start a panic...but everyone, check the color of your milk!
IMG_20231002_082329.jpg

Forum statistics

Threads
135,021
Messages
1,253,022
Members
177,951
Latest member
gomeisan
Top