Moving Problem and changing animation before moving 4 ways
Posted: Wed Sep 13, 2006 12:33 am
Question 1
I am making a pocket pc game. I thought I would not have all the slide - moonwalk problems that you would with a keyboard since I am using a directional pad.
I don't have the slide problem if I were only wanting to go left or right like in a platform game, but I want to do a top down game with a vehicle that moves up, down, left, right.
The problem lies with the 8 way directional pad of atleast my pocket pc and I'm sure other pocket pc's have an 8 way pad too.
When my pad hits an angle, like up and right it moves in that direction and I can set up an animation for that direction. When I move the pad from up right to right, it still shows the angle animation. Or when I move from up right to up I have the same problem.
I would actually be fine with only 4 directions. So I tried to make up right combo cancel out the x and y movements. This does stop the vehicle from moving at the angle, but it changes the animation to right, and it stays at right if I move the pad back in the up position causing the vehicle to move upwards with a right animation.
I tried makslane's avoiding platform slide code and it works for 4 directions, but when I hit the angles it still messes up the animation.
I am going to try Novice's code and I think that will work fine, I am just concerned it will be a performance hit on the pocket pc platform.
I can't believe this is such a big problem, and that there is not an easier way to do it.
Which brings me to question 2.
If Novice's code does work and is not a big hit on performance, or I find another way of doing it, does anyone know how I could achieve this desired effect.
If possible I would like the vehicle to show an animation of the vehicle turning to the direction I press before it actually moves in that direction. I think this can be achieved using wait for animation, but I don't know exactly how.
What I mean is now, I press right and it shows the vehicle pointing right, when I press left it instantly changes the vehicle to the left position, not very realistic.
If I could have the vehicle show an animation of it turning to right from left and all the other directions it would look much better.
Any ideas? Thanks guys.
I am making a pocket pc game. I thought I would not have all the slide - moonwalk problems that you would with a keyboard since I am using a directional pad.
I don't have the slide problem if I were only wanting to go left or right like in a platform game, but I want to do a top down game with a vehicle that moves up, down, left, right.
The problem lies with the 8 way directional pad of atleast my pocket pc and I'm sure other pocket pc's have an 8 way pad too.
When my pad hits an angle, like up and right it moves in that direction and I can set up an animation for that direction. When I move the pad from up right to right, it still shows the angle animation. Or when I move from up right to up I have the same problem.
I would actually be fine with only 4 directions. So I tried to make up right combo cancel out the x and y movements. This does stop the vehicle from moving at the angle, but it changes the animation to right, and it stays at right if I move the pad back in the up position causing the vehicle to move upwards with a right animation.
I tried makslane's avoiding platform slide code and it works for 4 directions, but when I hit the angles it still messes up the animation.
I am going to try Novice's code and I think that will work fine, I am just concerned it will be a performance hit on the pocket pc platform.
I can't believe this is such a big problem, and that there is not an easier way to do it.
Which brings me to question 2.
If Novice's code does work and is not a big hit on performance, or I find another way of doing it, does anyone know how I could achieve this desired effect.
If possible I would like the vehicle to show an animation of the vehicle turning to the direction I press before it actually moves in that direction. I think this can be achieved using wait for animation, but I don't know exactly how.
What I mean is now, I press right and it shows the vehicle pointing right, when I press left it instantly changes the vehicle to the left position, not very realistic.
If I could have the vehicle show an animation of it turning to right from left and all the other directions it would look much better.
Any ideas? Thanks guys.