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

Recreating Dewford Gym's Gimmick

155
Posts
10
Years
    • Seen Jun 11, 2021
    I'm trying to make a Dark-type Gym with the same gimmick as Dewford Gym, but I'm not sure how to go about doing this. I'm trying to use scripts to change the radius, but it's not working.
    Spoiler:

    What exactly am I doing wrong? Can anyone help me?
     
    52
    Posts
    8
    Years
  • I'm trying to make a Dark-type Gym with the same gimmick as Dewford Gym, but I'm not sure how to go about doing this. I'm trying to use scripts to change the radius, but it's not working.
    Spoiler:

    What exactly am I doing wrong? Can anyone help me?

    I've already done a script for that when I was scripting the Battle Pyramid, I've adapted it to you.
    The script will make the "visible circle" bigger when you defeat a trainer in the map you've selected in the configuration. Also, it saves the visible circle status. To use it just modify the settings (SAVED_RADIUS_VARIABLE and GYM_MAP_ID), you don't need to modify events.

    Code:
    SAVED_RADIUS_VARIABLE=50 # Variable to save the actual status of the dark circle
    GYM_MAP_ID=72 # Map id where the gym is located
    
    Events.onMapSceneChange+=proc{|sender,e|
      scene=e[0]
      mapChanged=e[1]
      return if !scene || !scene.spriteset || !$game_map || $game_map.map_id!=GYM_MAP_ID
      $PokemonTemp.darknessSprite=DarknessSprite.new
      scene.spriteset.addUserSprite($PokemonTemp.darknessSprite)
      darkness=$PokemonTemp.darknessSprite
      if $game_variables[SAVED_RADIUS_VARIABLE]==0
        $game_variables[SAVED_RADIUS_VARIABLE]=64
      end
      darkness.radius=$game_variables[SAVED_RADIUS_VARIABLE]
    }
    
    Events.onEndBattle+=proc {|sender,e|
       decision=e[0]
       return if $game_map.map_id!=GYM_MAP_ID || decision!=1
       darkness=$PokemonTemp.darknessSprite
       newRadius=darkness.radius+12
       while darkness.radius<newRadius
         Graphics.update
         Input.update
         pbUpdateSceneMap
         darkness.radius+=4
       end
       $game_variables[SAVED_RADIUS_VARIABLE]=darkness.radius
    }
    I hope this helps ;)
     
    155
    Posts
    10
    Years
    • Seen Jun 11, 2021
    I tried making event objects on the map to test the effects, and they're not working. I'm pressing the action button, the variable does change, but the circle remains the same.
     
    52
    Posts
    8
    Years
  • I tried making event objects on the map to test the effects, and they're not working. I'm pressing the action button, the variable does change, but the circle remains the same.

    The circle changes when you defeat a trainer.
    If you want the circle change only modifying the variable add this code and call it from an event with modifyCircle(new radius)

    Code:
    def modifyCircle(newRadius)
       darkness=$PokemonTemp.darknessSprite
       actualRadius=darkness.radius
       if newRadius>actualRadius
         while darkness.radius<newRadius
           Graphics.update
           Input.update
           pbUpdateSceneMap
           darkness.radius+=4
         end
    	else
         while darkness.radius>newRadius
           Graphics.update
           Input.update
           pbUpdateSceneMap
           darkness.radius-=4
         end
    	end
       $game_variables[SAVED_RADIUS_VARIABLE]=darkness.radius
    end
     
    Last edited:

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    I figured all you'd have to do is use:
    Code:
    darkness=$PokemonTemp.darknessSprite
    darkness.radius=[COLOR=Red]x[/COLOR]
    Where X is a number... Just add a while command if you want it to do something fancy... You could always make the map a "dark" map so the radius is there regardless... But I don't know what you want or what this Dewford Gym place is and it seems all Kleins code is, is an edited/complicated version of Flash.
     
    Back
    Top