Graviteam

English-speaking community => Steel Fury: Kharkov 1942 => Topic started by: lockie on April 23, 2014, 12:10:19 PM



Title: ai_rotate (command sector)
Post by: lockie on April 23, 2014, 12:10:19 PM
I've discovered a useful hint how to force the unit to rotate on the requested angle.
As we know command ai_rotate works in a very strange manner, unit rotates always at the same angle and direction. But there is a catch. If u want to rotate the unit in appropriate direction, then u've to manipulate with contour orientation  ::)
Let's see on this picture. I need tank to see in the direction along "red arrow", then I've to set up manually the contour orientation according necessary direction. In my case the angle of the blue contour is -135 degrees.
(http://s5.postimg.org/g8p0yxhqr/direction.jpg) (http://postimg.org/image/g8p0yxhqr/)
The script will be the next:
Code:
	ext, ai_stop;
ext, ai_defence, gbr_pos_01, 15, 1;
ext, ai_rotate, 180;
where
ai_stop - stop the unit movement
ai_defence - move and pick up pre-defined position gbr_pos_01(1 means distance, but seems it doesn't has effect at all)
ai_rotate - rotate (doesn't matter what the angle)


Title: Re: ai_rotate (command sector)
Post by: frinik on April 23, 2014, 01:38:12 PM
I have been using that feature in the ME and it's touch and go.Sometimes the AI will move according to the degrees of rotation that you entere sometimes not.

Are you positive your method is failsafe?


Title: Re: ai_rotate (command sector)
Post by: lockie on April 23, 2014, 03:10:49 PM
Are you positive your method is failsafe?
SF itself is not failsafe :)