Hello everyone, when I use "fly" from the party menu the map opens to me, I select the point to fly but then close the screen without making me fly, what can be the problem?
Do you have a correct Region Map ?
It's probably because the game doesn't know that the city can be selected. If it knew, you wouldn't be the one closing the map, it would close itself on selection and then make you fly. Check "Fly destination" on the link given above.
When you don't know what's happening, it's time to scan the file in functioning :)The pbs file is compiled correctly, the game recognizes the city etc., I really can't understand, if it gave me error it would be better hahah the scripts seem to be going well
class PokemonRegionMapScreen
def initialize(scene)
@scene = scene
end
def pbStartFlyScreen
@scene.pbStartScene(false,1)
ret = @scene.pbMapScene(1)
@scene.pbEndScene
pbMessage(_INTL("DEBUG: ret = {1}", ret)) # Add this line here.
return ret
end
def pbStartScreen
@scene.pbStartScene($DEBUG)
@scene.pbMapScene
@scene.pbEndScene
end
end
When you don't know what's happening, it's time to scan the file in functioning :)
In the script 009_UI_RegionMap (in Essentials v19) or in the script PScreen_Party (in Essentials v18), find this code:
Code:class PokemonRegionMapScreen def initialize(scene) @scene = scene end def pbStartFlyScreen @scene.pbStartScene(false,1) ret = @scene.pbMapScene(1) @scene.pbEndScene pbMessage(_INTL("DEBUG: ret = {1}", ret)) # Add this line here. return ret end def pbStartScreen @scene.pbStartScene($DEBUG) @scene.pbMapScene @scene.pbEndScene end end
Tell me what the message says when you open the Fly menu.
As soon as I can text it, and I'll let you know, Anyway I use 17.2 does it change?
Hum, I don't know, I don't have v17.2.
However I believe that the main difference between v17.2 and v18.1 consists in the battle system, so as far as Fly is concerned, they should be similar.
Hum, I don't know, I don't have v17.2.
However I believe that the main difference between v17.2 and v18.1 consists in the battle system, so as far as Fly is concerned, they should be similar.
Ok, the Kernel was missing, the code that comes out to me is 31417
def pbUseHiddenMove(pokemon,move)
return HiddenMoveHandlers.triggerUseMove(move,pokemon)
end
HiddenMoveHandlers::CanUseMove.add(:FLY,proc { |move,pkmn,showmsg|
# CODE
}
HiddenMoveHandlers::UseMove.add(:FLY,proc { |move,pokemon|
# CODE
}
Ok, so it actually gives the necessary fly data.
Do you have a function called "pbUseHiddenMove" somewhere in the code? Find its definition. If it's like a three-line definition like this:
Code:def pbUseHiddenMove(pokemon,move) return HiddenMoveHandlers.triggerUseMove(move,pokemon) end
find some code that looks like this:
Code:HiddenMoveHandlers::CanUseMove.add(:FLY,proc { |move,pkmn,showmsg| # CODE }
Code:HiddenMoveHandlers::UseMove.add(:FLY,proc { |move,pokemon| # CODE }
In either cases, post here the codes of pbUseHiddenMove and of the two HiddenMoveHandlers please (for Fly only lol).
NB: you can remove the line "pbMessage" I had you add ^^
def Kernel.pbUseHiddenMove(pokemon,move)
return HiddenMoveHandlers.triggerUseMove(move,pokemon)
end
HiddenMoveHandlers::CanUseMove.add(:FLY,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORFLY,showmsg)
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg
return false
end
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
Kernel.pbMessage(_INTL("Can't use that here.")) if showmsg
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
if !$PokemonTemp.flydata
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
pbFadeOutIn(99999){
$game_temp.player_new_map_id = $PokemonTemp.flydata[0]
$game_temp.player_new_x = $PokemonTemp.flydata[1]
$game_temp.player_new_y = $PokemonTemp.flydata[2]
$game_temp.player_new_direction = 2
Kernel.pbCancelVehicles
$PokemonTemp.flydata = nil
$scene.transfer_player
$game_map.autoplay
$game_map.refresh
}
pbEraseEscapePoint
return true
})
return false if !pbCheckHiddenMoveBadge(BADGEFORFLY,showmsg)
pbMessage("Hello.")
Below the line:
Code:return false if !pbCheckHiddenMoveBadge(BADGEFORFLY,showmsg)
write the line:
And tell me if you see the "Hello" message when trying to fly.Code:pbMessage("Hello.")
That's the error I hoped to see, because now it means the issue is yet to be found XDIt shows me "Hello", and then it opens the map it makes me select the point and then nothing comes back to the game without doing anything, I own all the medals in the game of course
HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
pbFadeOutIn(99999){
Kernel.pbMessage("Hello 2")
That's the error I hoped to see, because now it means the issue is yet to be found XD
In the handler:
above the line:Code:HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
paste the line:Code:pbFadeOutIn(99999){
and tell me if you see this hello.Code:Kernel.pbMessage("Hello 2")
(remove the other "Hello" I had you add)
Sorry it takes time, I don't use v17.2 and I don't know what your issue is ^^"
That's the error I hoped to see, because now it means the issue is yet to be found XD
In the handler:
above the line:Code:HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
paste the line:Code:pbFadeOutIn(99999){
and tell me if you see this hello.Code:Kernel.pbMessage("Hello 2")
(remove the other "Hello" I had you add)
Sorry it takes time, I don't use v17.2 and I don't know what your issue is ^^"
Argggggg :(No, it doesn't show me the writing
# Returns whether move was used
def self.triggerUseMove(item,pokemon)
Kernel.pbMessage("triggerUseMove 1") # Add this
return false if !UseMove[item]
Kernel.pbMessage("triggerUseMove 2") # Add this
return UseMove.trigger(item,pokemon)
Kernel.pbMessage("triggerUseMove 3") # Add this
end
Argggggg :(
So it means that the Fly function is not called. Remove the "hello" message and find the function self.triggerUseMove(item,pokemon) and add the following messages:
Code:# Returns whether move was used def self.triggerUseMove(item,pokemon) Kernel.pbMessage("triggerUseMove 1") # Add this return false if !UseMove[item] Kernel.pbMessage("triggerUseMove 2") # Add this return UseMove.trigger(item,pokemon) Kernel.pbMessage("triggerUseMove 3") # Add this end
and tell me the last message you get.
The game tells me "Script '115' line PField_FieldMov: SyntaxError occured.
compile error
115:PField FieldMoves:43: syntax error
Kernel.pbMessage("triggerUseMove3")
A
115:PField FieldMoves: 71: syntax error
.Kernel.pbMessageLINTL("Sorry, a new Badge is required.,") .
115:PField FieldMoves: 71: dynamic constant assignment
...Kernel.pbMessageLINTL("'Sorry,a new Badge is required.")) i.
115:PField FieldMoves: 71: syntax error
....pbMessageLINTL("Sorry, a new Badge is required.")) if show.
A
115:PField FieldMove
In the error message, I see : Kernel.pbMessageLINTL("Sorry, a new Badge is required.,")
Find that pbMessageLINTL( and replace it with pbMessage(_INTL( (note the parentheses). It's probably a typo you made ^^