Post #1
Craftstar2
Aug 9 2008, 5:07 pm
![[Avatar]](/images/avatars/3.gif)
|
Is it possible to detect when a unit turns, and slow it down (with burrowed units)? I'm thinking of a kind of acceleration concept with turns making you lose speed.
Is it possible to detect when a unit turns, and slow it down (with burrowed units)? I'm thinking of a kind of acceleration concept with turns making you lose speed.
|

Post #2
NudeRaider
Aug 9 2008, 5:22 pm
![[Avatar]](/uploads/avatar/918.gif)
Write your own destiny, or else someone will write it for you!
|
You can detect current movement direction using a [url=http://www.staredit.net/wiki/Grid_Systems]mobile grid (scroll down)[/url].
You just need to store the current direction and compare it with the next detection. If he didn't move to the same grid he has turned.
But i guess this wouldn't work well as sc units don't walk/fly in curves. They fly in straights and have instant turns inbetween.
So the slowdown would lag behind a bit as you cannot detect the actual facing.
You can detect current movement direction using a [url=http://www.staredit.net/wiki/Grid_Systems]mobile grid (scroll down)[/url]. You just need to store the current direction and compare it with the next detection. If he didn't move to the same grid he has turned.
But i guess this wouldn't work well as sc units don't walk/fly in curves. They fly in straights and have instant turns inbetween. So the slowdown would lag behind a bit as you cannot detect the actual facing.
 http://sonsofwar.pyrom.net/index.html___0% 100%
|

Login to report
0 members in this topic: None
+ 0 guest(s)
You must log in to shout.