• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Help with using cut...

updawg734

Whats up, dawg?
Member
Joined
Apr 26, 2017
Posts
89
So I am trying to make it so that all HM's are used without needing a badge requirement. I have figured that part out...but now it allows me to use cut whenever I want, even when I don't have a Pokémon that knows the move. I have tried running the game outside of debug mode and I'm getting the same thing. Here is my script under the "Cut" section of PField_FieldMoves:

def Kernel.pbCut
move = getID(PBMoves,:CUT)
movefinder = Kernel.pbCheckMove(move)
Kernel.pbMessage(_INTL("These weeds are blocking the path.\1"))
if Kernel.pbConfirmMessage(_INTL("Would you like to cut them?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
pbHiddenMoveAnimation(movefinder)
return true
end
return false
end

HiddenMoveHandlers::CanUseMove.add(:CUT,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORCUT,showmsg)
facingEvent = $game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("Can't use that here.")) if showmsg
return false
end
return true
})

HiddenMoveHandlers::UseMove.add(:CUT,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
facingEvent = $game_player.pbFacingEvent
if facingEvent
pbSmashEvent(facingEvent)
end
return true
})

def pbSmashEvent(event)
return if !event
if event.name=="Tree"; pbSEPlay("Cut",80)
elsif event.name=="Rock"; pbSEPlay("Rock Smash",80)
end
pbMoveRoute(event,[
PBMoveRoute::Wait,2,
PBMoveRoute::TurnLeft,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnRight,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnUp,
PBMoveRoute::Wait,2
])
pbWait(2*2*4)
event.erase
$PokemonMap.addErasedEvent(event.id) if $PokemonMap
end

I am stumped. Anyone know what I did wrong?
 

aiyinsi

A wild Minun appeared!
Member
Joined
May 17, 2017
Posts
256
The right Subforum to ask for such help would be under Pokémon Essentials

Regarding the question:
you deleted this entire bit that handels what happens if you cannot use cut:

Code:
Expand Collapse Copy
if !pbCheckHiddenMoveBadge(BADGEFORCUT,false) || (!$DEBUG && !movefinder)
    Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
  end

you only wanted to delete the badge check so it would look like so:

Code:
Expand Collapse Copy
if (!$DEBUG && !movefinder)
    Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
  end
 

updawg734

Whats up, dawg?
Member
Joined
Apr 26, 2017
Posts
89
The right Subforum to ask for such help would be under Pokémon Essentials

Regarding the question:
you deleted this entire bit that handels what happens if you cannot use cut:

Code:
Expand Collapse Copy
if !pbCheckHiddenMoveBadge(BADGEFORCUT,false) || (!$DEBUG && !movefinder)
    Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
  end

you only wanted to delete the badge check so it would look like so:

Code:
Expand Collapse Copy
if (!$DEBUG && !movefinder)
    Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
  end

Thank you so much!! That fixed my issue, definitely my own error. I apologize for posting in the wrong subforum. I'll keep that info in mind when posting in the future. Thanks again!
 
Back
Top