The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Creating an Inverse Batlle Effect

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old June 25th, 2020 (11:57 AM).
Redylriws Redylriws is offline
 
Join Date: Jul 2015
Location: Lilycove City, Hoenn
Gender: Male
Nature: Quirky
Posts: 10
I'm working in Pokemon Essentials v17.2, and trying to create a move that turns the battle into an Inverse Battle, Trick Room style. I'm currently running into an error though, in the PokeBattle_Battler script, with a NoMethodError, with the text underneath being "undefined method 'effects' for nil:NilClass". The code I'm using is as follows, and the error is on "if @field.effects[PBEffects::InverseRoom]>0"

# Inverse Room
if @field.effects[PBEffects::InverseRoom]>0
@field.effects[PBEffects::InverseRoom]-=1
if @field.effects[PBEffects::InverseRoom]==0
pbDisplay(_INTL("Inverse Room wore off, and type effectiveness returned to normal!"))
PBDebug.log("[End of effect] Inverse Room ended")
end
end

I've set up an effect in PBEffects and PokeBattle_ActiveSideField in the correct section, and set up the effect in PokeBattle_MoveEffects, and what it actually does in PokeBattle_Move (since it directly changes type effectiveness). Everything is spelled the same way everywhere.

Anyone know why I'm getting this error and how to fix it?

I've set up an effect in PBEffects and PokeBattle_ActiveSideField in the correct section, and set up the effect in PokeBattle_MoveEffects, and what it actually does in PokeBattle_Move (since it directly changes type effectiveness). Everything is spelled the same way everywhere.

Anyone know why I'm getting this error and how to fix it?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 25th, 2020 (2:26 PM).
__fred__40's Avatar
__fred__40 __fred__40 is offline
fred
 
Join Date: Oct 2019
Location: mt silver
Gender: Male
Nature: Bold
Posts: 277
I think you are in the wrong section,try ask here in Game Development
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old June 26th, 2020 (11:25 AM).
Redylriws Redylriws is offline
 
Join Date: Jul 2015
Location: Lilycove City, Hoenn
Gender: Male
Nature: Quirky
Posts: 10
Yeah, I am. Question moved
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:15 AM.