B
BlackeyeI
Guest
I'm currently making an RTS (Real Time Strategy) game and i'm having trouble knowing how to make the sprites face the left or right in which they're going. You can place an object called goto they will travel to it and stop when they touch it. I would like to know how to make the sprite index change (.e.g. sprite index 0 = left, sprite index 1 = right) when it's going left or right.
Suggestions: Just in case you don't think you know where to start here are some ideas that I think could work.
1# If image_angle is 180o left or right then change to sprite index 0 or 1 (left or right).
2# Somehow tell the object to see if it's physically moving in a direction, if true then change sprite index to 0 or 1 (left or right).
3# Make the unit objects calculate if object goto is on the left or right side of them and then face that way (sprite index to 0 or 1).
NOTE: I don't want them to rotate, just face left or right.
Thank you for having the time to read and think about this question. Thanks
Suggestions: Just in case you don't think you know where to start here are some ideas that I think could work.
1# If image_angle is 180o left or right then change to sprite index 0 or 1 (left or right).
2# Somehow tell the object to see if it's physically moving in a direction, if true then change sprite index to 0 or 1 (left or right).
3# Make the unit objects calculate if object goto is on the left or right side of them and then face that way (sprite index to 0 or 1).
NOTE: I don't want them to rotate, just face left or right.
Thank you for having the time to read and think about this question. Thanks