Jump to content
Sign in to follow this  
PicVert

Help to make a script

Recommended Posts

I would make a script that use action command to rotate a vehicle 360° by using step of 30° then action command to rotate 30° again by right or left side.

I need only the code to rotate 30° right or left.

Did some one know this line of code ?

Thx a lot.

Share this post


Link to post
Share on other sites

Off top of my head:

_unit = <id of unit you want to rotate left>

_destangle = (GetDir _unit) - 30

? _destangle < 0: _destangle = 360 + _destangle

#loop

; change unit facing by 1 degree

_newangle = (GetDir _unit) - 1

? _newangle < 0: _newangle = 360 + _newangle

? _newangle >= _destangle: _unit SetDir _newangle

? _newangle == _destangle: goto "end"

~1

goto "loop"

#end

exit

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×