I have a character and a pickup item (axe) When the character picks up the item I have the axe animated sprite assigned to a keyboard button. So when the button is pressed it will play the axe swinging.
My control scheme is W(forward) S(reverse) A(rotate left) and D(rotate right) and SHIFT is my axe attack button for now.
He's the problem, my axe swing sprite won't face the direction that the player is facing while standing still androtating. BUT, if i'm moving forward AND rotating it works fine(faces the same direction as the player)
I need it to face the direction while rotating and not moving forward.
I must be missing something...it almost works...
Thanks!
Weapon facing same direction as player
Started by Migsta, Aug 20 2012 07:19 PM
4 replies to this topic
#1
Posted 20 August 2012 - 07:19 PM
#2
Posted 20 August 2012 - 07:42 PM
If it works while moving forward, then you need to move some of your code or remove a check. Without seeing any of your code, I can't help you much.
#3
Posted 20 August 2012 - 08:04 PM
Can you show some code. It's kind of hard to guess solutions without seeing how you're doing things.
#4
Posted 20 August 2012 - 08:08 PM
based on what you have said you need the axe objects image_angle to equal the image angle of the player sprite.
just punch in image_angle=player_obj.image_angle
Make sure to replace player_obj with your player objects name
just punch in image_angle=player_obj.image_angle
Make sure to replace player_obj with your player objects name
#5
Posted 21 August 2012 - 03:35 AM
based on what you have said you need the axe objects image_angle to equal the image angle of the player sprite.
just punch in image_angle=player_obj.image_angle
Make sure to replace player_obj with your player objects name
That did it! I knew it was going to be somthing simple...lol Thanks!!!!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











