View Single Post
  #10    
Old September 30th, 2012, 06:53 PM
IceGod64's Avatar
IceGod64
My imagination.
 
Join Date: Oct 2008
Location: Castelia City
Age: 26
Gender: Male
Nature: Naive
Quote:
Originally Posted by FL . View Post
1,2-In PokeBattle_ActualScene change
Code:
    if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
    if @animatingEXP
      if !@showexp
        @currentexp=@endexp
      elsif @currentexp<@endexp
        @currentexp+=1
      elsif @currentexp>@endexp
        @currentexp-=1
      end
      refresh
      if @currentexp==@endexp
        if @currentexp==PokeBattle_Scene::EXPGAUGESIZE
to
Code:
  hpspeed=4 # hp speed here, put 1000 for instantaneous
  if @animatingHP
   if @currenthp<@endhp
    if(@endhp-@currenthp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp+=hpspeed
    end
   elsif @currenthp>@endhp
    if(@currenthp-@endhp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp-=hpspeed
    end
   end
   refresh
   @animatingHP=false if @currenthp==@endhp
  end
  if @animatingEXP
   expspeed # exp speed here
   if !@showexp
    @currentexp=@endexp
   elsif @currentexp<@endexp
    @currentexp+=expspeed
   elsif @currentexp>@endexp
    @currentexp-=expspeed
   end
   refresh
   if @currentexp>=@endexp
    if @currentexp>=PokeBattle_Scene::EXPGAUGESIZE
3-Yes, use @currenthp minus @endhp.
Um.... What?

Would'nt it be more efficient to just change
Code:
if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
to

Code:
if @animatingHP
      @currenthp = @endhp
      @animatingHP=false
    end
__________________

Reply With Quote