10-04-2024, 06:38 AM
CriticalAlert VX + ACE
by Kyonides
Introduction
This scriptlet allows you to let the game call a preset common event whenever an actor or an enemy strikes the foe with a critical hit. The only thing you have to do is setting the appropriate common event ID's and that's it, guys!
VX Script
Code:
# * CriticalAlert VX * #
# 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 @critical
if user.is_a?(Game_Actor)
event_id = CriticalAlert::ACTOR_COMMON_EVENT_ID
else
event_id = CriticalAlert::ENEMY_COMMON_EVENT_ID
end
$game_temp.common_event_id = event_id
end
end
VX ACE Script
Code:
# * 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
Terms & Conditions
Free for use in any game.
Don't buy cat treats for a week!
That's it!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE