RPG Maker Forums

So I just got into RMVXA recently after a wave of inspiration washed over me to give it a shot. I've been spending the past couple days tinkering around and getting to know the program and decided to learn how to script for this program. I wanted to start with a fairly simple custom state that will nullify the damage of one elemental attack of a particular element, but I can't seem to get it to work. Based off my three-day knowledge of both Ruby and RPG Maker-specific scripting, this is what I've come up with.

module Null_Element  ATTACK_ELEMENT = ()  NULL_ELEMENT = ()  NULL_STATE_ID = ()endclass RPG::State < RPG::BaseItem  if @note =~ /<null (.*)>/i    $1.to_i    NULL_ELEMENT = $1    NULL_STATE_ID = RPG::State.id  endend#~ class Game_BattlerBase#~   def element_null#~       ATTACK_ELEMENT = user.atk_elements#~   end#~ endclass Game_Battler < Game_BattlerBase  ATTACK_ELEMENT = user.atk_elements  if NULL_ELEMENT == ATTACK_ELEMENT    alias null_damage_value :make_damage_value    def make_damage_value(user, item)      @result.make_damage(0, item)      self.remove_state(NULL_STATE_ID)    end  endendI am able to embue a target with the State I want through a skill no problem, and it shows that the state is put on the target. However, it doesn't seem to show that the state is active, nor does it prevent any damage or dissappear after an appropriate elemental attack has been used. Where am I going wrong? Am I calling the right variables to get the appropriate information?

EDIT: I should probably mention that I'm using GBTS. I tinkered with it a little and tested the state on the normal system and it works fine for whatever reason (though it still won't disappear after they're hit with the attack :\) but it doesn't work at all in the GBTS battle.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,479
Members
137,824
Latest member
dobratemporal
Top