• 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.

dark map...then not dark map

87
Posts
8
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.
     
    129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    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.
     
    87
    Posts
    8
    Years
    • Seen Jul 24, 2016
    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
     
    129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    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")
     
    87
    Posts
    8
    Years
    • Seen Jul 24, 2016
    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