Please help(animation)!

SxarcisiousSxarcisious Member Posts: 45
Ok so I have an actor, which chases the player actor. I am using joystick controls. I have set up this actor to animate based on the direction he is moving.

My problem is that the actor only animate in the SW,S,SE,E directions...He does not animate when going NE,N,NE,W...

I did not do anything different on those four directions and have looked it over and still can not figure it out.

I have his self.direction constrained to this :

vectorToAngle( self.Position.X - game.GoodGuysX , self.Position.Y - game.GoodGuysY )

Then this is the S direction ( this one animates) :

When All true
self.direction >= 45
self.direction < 90
animate

Now this one is North(up) and dosnt animate..(
When all true
self.direction >= 225
self.direction < 270
animate

I wish to figure out why this one does not animate.... Thanks.

Comments

  • old_kipperold_kipper Member Posts: 1,420
    Have you tried making a number visible for each of the direction set you are trying to animate? I would do this so you are sure that there is not a conflict somewhere, and once you can get a number displaying correctly for your 'clock' of directions, you can use the same system to trigger the correct animation.

    Hope that helps. Kipper
  • SxarcisiousSxarcisious Member Posts: 45
    I just tried making a number visible for each direction. I had the same problem, it would work on the same 4 directions and not the others. I have no idea whats wrong, I've been trying to figure it out.
  • old_kipperold_kipper Member Posts: 1,420
    I would check that your values to switch the areas are not overlapping. I've made this mistake in the past. If you southern value rules work, I would just compare them with your northern value sets. It might be the in mix of 'less than', equal or greater, etc...

    good luck. kipper
  • SxarcisiousSxarcisious Member Posts: 45
    K I just took all the animations out and tried to just have him animate up, I also tried to just have a number show up when his his angle was between 45 and 135.. It is just not registering he is going that way even though he moves that direction.
  • SxarcisiousSxarcisious Member Posts: 45
    Solved!
  • old_kipperold_kipper Member Posts: 1,420
    Interested to know how?
  • SxarcisiousSxarcisious Member Posts: 45
    I used display text for the actors self.direction. I was using angles when my self.direction was a real. So I changed self.direction to an angle and used display text to see the correct value(i could have left it as a real and did it too though).
Sign In or Register to comment.