hey guys i'm having a bit of trouble figuring this out, hoping somneone can help
I'm looking at making a sprite move from point A to point B.
I will be having objects in an array move from different points by taking the distance and time and setting the sprite position by time left.
For instance [Sprite 1] is going to be going from Point A to Point B (back and forth) i can work out the distance between them and divide that by the speed the sprite can move (variable) and then when i need to display the sprite image i can set its position from the time remaining from the array (which will be the only thing updated)
So if viewing the 'graphical' layout it will set sprites position every tick from the time left stored in the array.
Hope this makes sense and hope you guys can help.
Thanks in advance ;)
EDIT: the time it takes to travel will be updated by the array, so [every 1 second] subtract 1 from time left in array
Edit2: so if i load layout while sprite is halfway through journey how would i set the X/Y co-ords