High Treason, on Sep 7 2009, 01:21 AM, said:
I have searched the wiki and cant find if there is a way to change the angle that the player sprite faces and the angle that the player fires at.
What do I need to tamper with to change these things? I hope they can be meddled with or else i will have to go a very long way around.
Basically what I am trying to do is make it so when the player presses the back key (onevent MOVE_BACKWARD) it changes the angle of the player sprite and firing, but it can't just change the way the player is facing because that would effectively make him walk the same way he had been doing. Obviously I am working from a 2D perspective, so he will always face the exact same angle when walking a particular way - For example, it might always set his angle so he faces the left of the map, this wouldn't matter because it is only using 2 dimensions anyway.
http://wiki.eduke32.com/wiki/Ang
Is that what you want? I'm confused by your post.
It sounds like you want the player to automatically turn around each time he reverses direction, like in Contra and a lot of other 2D games. That means he won't be able to run backwards, which I think is a shame, because running backwards while firing is useful. If I were coding it I would make use of the existing turn around key and allow moving backwards to function normally (albeit with an enforced corridor relative angle).
EDIT @XThX2: What do you imagine he is going to do with that code? If you are trying to help an inexperienced person by posting code, you should make sure that it actually works, otherwise it just creates more confusion.