• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Event plays twice and key item can be tossed?

69
Posts
9
Years
  • So, in my game, there is an event that prevents the player from leaving Pallet Town without a Pokémon. This is the event:
    Code:
    Script: pbExclaim($game_player)
    Text:It's dangerous to go alone! You need to take a 
    Pokémon!
    Set Move Route: Player (Ignore if Can't Move)
    -Move Down
    -Move Down
    The player moves down accordingly, but then the event plays again and the player moves down again, dialogue and all. What's causing this.
    Also, I have an item registered as a Key Item, but it can be tossed. But how? Is it not registered correctly? Here's its entry in items.txt
    Code:
    526,GBSOUNDS,GB Sounds,8,0,A music player that allows you to listen to nostalgic songs. It's operated with the flip of a single switch.,2,0,6,
    And here's its two PokemonItemEffects entries:
    Code:
    ItemHandlers::UseFromBag.add(:GBSOUNDS,proc{|item|
       $game_switches[59]=true  if $game_switches[59]== false
       $game_switches[59]=false if $game_switches[59]== true
       pbBGMStop()
       $game_system.setDefaultBGM(nil)
       next 1 # Continue
    })
    ItemHandlers::UseInField.add(:GBSOUNDS,proc{|item|
       $game_switches[59]=true  if $game_switches[59]== false
       $game_switches[59]=false if $game_switches[59]== true
       pbBGMStop()
       $game_system.setDefaultBGM(nil)
       next 1 # Continue
    })
    Have any help?
     
    1,224
    Posts
    10
    Years
  • So, in my game, there is an event that prevents the player from leaving Pallet Town without a Pokémon. This is the event:
    Code:
    Script: pbExclaim($game_player)
    Text:It's dangerous to go alone! You need to take a 
    Pokémon!
    Set Move Route: Player (Ignore if Can't Move)
    -Move Down
    -Move Down
    The player moves down accordingly, but then the event plays again and the player moves down again, dialogue and all. What's causing this.
    Also, I have an item registered as a Key Item, but it can be tossed. But how? Is it not registered correctly? Here's its entry in items.txt
    Code:
    526,GBSOUNDS,GB Sounds,8,0,A music player that allows you to listen to nostalgic songs. It's operated with the flip of a single switch.,2,0,6,
    And here's its two PokemonItemEffects entries:
    Code:
    ItemHandlers::UseFromBag.add(:GBSOUNDS,proc{|item|
       $game_switches[59]=true  if $game_switches[59]== false
       $game_switches[59]=false if $game_switches[59]== true
       pbBGMStop()
       $game_system.setDefaultBGM(nil)
       next 1 # Continue
    })
    ItemHandlers::UseInField.add(:GBSOUNDS,proc{|item|
       $game_switches[59]=true  if $game_switches[59]== false
       $game_switches[59]=false if $game_switches[59]== true
       pbBGMStop()
       $game_system.setDefaultBGM(nil)
       next 1 # Continue
    })
    Have any help?
    I don't have a solution for your actual problem but this

    Code:
    $game_switches[59]=true  if $game_switches[59]== false
       $game_switches[59]=false if $game_switches[59]== true
    should be this
    Code:
    $game_switches[59] = !$game_switches[59]
    As is it would switch it to true, then back to false, so it wouldn't work.
     

    Radical Raptr

    #BAMFPokemonNerd
    1,123
    Posts
    13
    Years
  • You must be testing it in RMXP, where you can toss the item, try it by loading the actual game and seeing if its the same.
    As for the event problem, is it on autorun? or something like that? It should be on player touch. If that's not it, try testing the one from Essentials and if it works copy it.
     
    69
    Posts
    9
    Years
  • You must be testing it in RMXP, where you can toss the item, try it by loading the actual game and seeing if its the same.
    As for the event problem, is it on autorun? or something like that? It should be on player touch. If that's not it, try testing the one from Essentials and if it works copy it.
    Thanks for your help. Doing this right away.
     

    ~JV~

    Dev of Pokémon Uranium
    684
    Posts
    16
    Years
  • Your problem with the event is that you're missing a "Wait for move's completion". With the way it's setup right now the event exits processing before the movement, activating it once again since the player is in the same position.
     
    Back
    Top