• 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!
  • Dawn, Gloria, Juliana, or Summer - 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.

Adjustable Dark Circle (like Dewford Gym)

  • 1,189
    Posts
    11
    Years
    Simply insert this code into a new section above the Main

    Code:
    DEFAULTDARKCIRCLERAD = 64
    $DarknessSprite = nil
    
    class PokeBattle_Trainer
      attr_writer :beginDarkCircle
      def beginDarkCircle
        @beginDarkCircle = false if !@beginDarkCircle
        return @beginDarkCircle
      end
      
      attr_writer :darkCircleRadius
      def darkCircleRadius
        if !@darkCircleRadius
          @darkCircleRadius = DEFAULTDARKCIRCLERAD
        end
        return @darkCircleRadius
      end  
    end
    
    def beginDarkCircle
      $DarknessSprite = DarknessSprite.new
      $DarknessSprite.radius = $Trainer.darkCircleRadius
      $Trainer.beginDarkCircle = true
    end
    
    def endDarkCircle
      return if !$Trainer.beginDarkCircle
      $DarknessSprite.dispose
      $DarknessSprite = nil
      $Trainer.beginDarkCircle = false
      $Trainer.darkCircleRadius = DEFAULTDARKCIRCLERAD
    end
    
    def changeDarkCircleRadius(newRadius)
      return if $DarknessSprite == nil
      $Trainer.darkCircleRadius = newRadius
      $DarknessSprite.radius = $Trainer.darkCircleRadius
    end
    
    def changeDarkCircleRadiusSlowly(newRadius)
      return if $DarknessSprite == nil
      $Trainer.darkCircleRadius = newRadius
      changeRate = (newRadius - $DarknessSprite.radius)/12
      return if changeRate == 0
      for i in 0...12
        $DarknessSprite.radius += changeRate
        pbWait(1)
      end
      $DarknessSprite.radius = $Trainer.darkCircleRadius
    end
    
    
    Events.onMapSceneChange+=proc{|sender,e|
      scene=e[0]
      mapChanged=e[1]
      return if !$Trainer
      beginDarkCircle if $Trainer.beginDarkCircle && $DarknessSprite == nil
      if $Trainer.beginDarkCircle && $PokemonTemp.darknessSprite
        $PokemonTemp.darknessSprite.dispose
        $PokemonTemp.darknessSprite = nil
      end
    }

    Available scripts you should use:
    beginDarkCircle # Initially draw the circle, don't have to do this again unless you get rid of it
    endDarkCircle # Permanently get rid of the circle
    changeDarkCircleRadius(newRadius) #Instantly change the radius of the circle
    changeDarkCircleRadiusSlowly(newRadius) #Slowly change the radius of the circle (smooth animation)

    Script in action
    [PokeCommunity.com] Adjustable Dark Circle (like Dewford Gym)
     
    Last edited:
    I'm really loving this so far. You did a good job on it!

    Just one question though. Is there a way to add to the current radius without immediately expanding/contracting to the next size? For example, if someone whose circle is currently at a width of 32 interacts with an object, it increases their radius to 64, but if someone with a radius of 64 interacts with it, it'd increase it to 96, If that makes sense.
     
    I followed the instructions however sadly this script did not work for me.
    Any specific version or place to put the new script?
     
    Back
    Top