• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Selene, Mint, Solana - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

dark map...then not dark map

  • 78
    Posts
    9
    Years
    • Seen Jul 24, 2016
    Can anyone help me make a map with dark on that after beating a certain trainer the darkness would go out? Example: 2nd gym Pokemon Ruby/Saphire/Emerald after beating the leader its not dark anymore.
    NOTE: Really sorry for this horrible english.
     
    The sprite that simulates the darkness is kept in $PokemonTemp.darknessSprite. You could create an autorun event in the gym. The page would need the conditions to check for the badge switch and the tsIsOff?("A") switch, and could run the following script:

    Code:
    if $PokemonTemp.darknessSprite
      $PokemonTemp.darknessSprite.dispose
      $PokemonTemp.darknessSprite=nil
    end
    setTempSwitchOn("A")
    Note: I haven't tested this code. What it should do is get rid of the darkness when the badge switch is on. (The TempSwitch makes sure it only runs once per area load.)

    Also note, this won't animate getting rid of the darkness. If you wanted to try doing that, you can play around with looping while increasing $PokemonTemp.darknessSprite.radius as part of the gym leader defeat script. Check out the PField_HiddenMoves script section, HiddenMoveHandlers::UseMove for flash (~line 966), for an example to copy.
     
    The sprite that simulates the darkness is kept in $PokemonTemp.darknessSprite. You could create an autorun event in the gym. The page would need the conditions to check for the badge switch and the tsIsOff?("A") switch, and could run the following script:

    Code:
    if $PokemonTemp.darknessSprite
      $PokemonTemp.darknessSprite.dispose
      $PokemonTemp.darknessSprite=nil
    end
    setTempSwitchOn("A")
    Note: I haven't tested this code. What it should do is get rid of the darkness when the badge switch is on. (The TempSwitch makes sure it only runs once per area load.)

    Also note, this won't animate getting rid of the darkness. If you wanted to try doing that, you can play around with looping while increasing $PokemonTemp.darknessSprite.radius as part of the gym leader defeat script. Check out the PField_HiddenMoves script section, HiddenMoveHandlers::UseMove for flash (~line 966), for an example to copy.

    Yes it takes the dark off but it freezes the game...nothing happens next
     
    Yes it takes the dark off but it freezes the game...nothing happens next

    Define "freezes". Are we talking softlock, like its sitting there possibly animating, also the music is playing, etc, but you can't move, and does that forever? Or are we talking after 10 seconds the game tries to emergency save?

    Did you make sure to put the tsIsOff?("A") switch in the conditions of the event's page?

    You can try, as an alternative, this code:
    Code:
    if $PokemonTemp.darknessSprite && !$PokemonTemp.darknessSprite.disposed?
      $PokemonTemp.darknessSprite.radius=176
    end
    setTempSwitchOn("A")
     
    Define "freezes". Are we talking softlock, like its sitting there possibly animating, also the music is playing, etc, but you can't move, and does that forever? Or are we talking after 10 seconds the game tries to emergency save?

    Did you make sure to put the tsIsOff?("A") switch in the conditions of the event's page?

    You can try, as an alternative, this code:
    Code:
    if $PokemonTemp.darknessSprite && !$PokemonTemp.darknessSprite.disposed?
      $PokemonTemp.darknessSprite.radius=176
    end
    setTempSwitchOn("A")
    I fixed it man ...Stupid fail of mine. TY so much anyways
     
    Back
    Top