• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our next favorite protagonist poll is for the Fiore region, from Pokémon Ranger 1! This poll is only lasting 2 days, so don't forget to cast your vote for your favorite Fiore protagonist before it's over!
  • 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?
     
    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 ;)
     
    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.
     
    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:
    Just noticed, Klien, you told him to call modifyCircle from the event, but in the code you made a function called modifyRadius. Might want to change one of those to match the other.
     
    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