Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Yggdrasil Animations, Problem with animation rotation
Philip
post Feb 18 2012, 01:16 PM
Post #1


Nura (The Jade Ring)
Group Icon

Group: Revolutionary
Posts: 325
Type: Developer
RM Skill: Masterful




I've been trying to solve this on my own but I can't. It seems that EVERY animation is being rotated to match the player's direction. When setting up attacks you can place rotate animation in the parameters and it will rotate it with the player's direction; however, it doesn't work properly and every animation played will rotate. It's REALLY annoying I'd just comment the rotation out all together but I'd like the animations when you attack to be rotated. The Yggdrasil Visual script with the rotation is included below.

CODE
  #--------------------------------------------------------------------------
  # * Set Animation Sprite
  #     frame : Frame data (RPG::Animation::Frame)
  #--------------------------------------------------------------------------
  alias iex_ygg_spc_animation_set_sprites animation_set_sprites unless $@
  def animation_set_sprites(*args)
    iex_ygg_spc_animation_set_sprites(*args)  
    if @character.abs_useing_atk_anim
      for i in 0..15
        sprite = @animation_sprites[i]
        #adding_angle = IEX::YGGDRASIL::DEFAULT_ANIM_ANGLE
        unless @character.iex_anim_lock_direc          
          direc = @character.direction
        else
          direc = @iex_started_direction
        end  
          case direc
          when 2; adding_angle += @character.abs_reverse_blade_anim ? -90 : 90
          when 4; adding_angle += @character.abs_reverse_blade_anim ? 180 : 0
          when 6; adding_angle += @character.abs_reverse_blade_anim ? 0 : 180
          when 8; adding_angle += @character.abs_reverse_blade_anim ? 90 : -90  
          end
        if @character.abs_reverse_blade_anim
          sprite.mirror = true
        end  
        sprite.angle += adding_angle
      end
    end  
  end


The @abs_useing_atk_anim variable is set to true when you use an attack that has rotate animation in the parameter; however, I'm not sure that it works.

If anyone has a solution to this please let me know.


__________________________
"If your mind goes blank don't forget to turn off the sound." Unknown Author

Phil


Go to the top of the page
 
+Quote Post
   
Night_Runner
post Feb 19 2012, 03:51 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




Try changing @character to @battler

If that doesn't work I would need to ask for a demo, there's too many things that could cause it, and I'm not sure which it is without being able to test it.


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th May 2013 - 08:06 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker