Jump to content
Sign in to follow this  
sfc.itzhak

get amount of angle?

Recommended Posts

is it possible to calculate who many degrees did the tank (not the turret) did??

like a script that will calculate how many degrees did the tank hull did and how meny meter did he move in that time..

i know it seems impossible but is there a way??

thanks

sfc.itzhak

Share this post


Link to post
Share on other sites

Do you mean the total number of degrees the bearing of the tank chassis has changed over the course of a mission (eg, total number of degrees turned = 5000 left + 6030 right = 11030)?

It would easy enough to do using getDir/direction, but I can't imagine why you'd want to.

Share this post


Link to post
Share on other sites

i want to simulate the tracks goes off its place

i will explain..

if a atank turns in the spot he will "loose" his track because it can slip out of place

so i want to calculate how meny degrees did the tanks hull did without moving 1 meter

so is it possible?

thanks

sfc

Share this post


Link to post
Share on other sites

Ah, I understand now. Nice idea. This sqs basically works, although I'm not sure about what kind of numbers should be used to be realistic. I'm sure a more efficient version would be possible. A word of warning though, the ArmA simulation of tracked vehicles adds oversteer when turning under brakes, making this situation quite easy to create.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

tankDir = getDir tank

~0.8

#loop2

if !(alive tank) then {exit}

~0.2

if (abs (speed tank) > 3) then {goto "loop"}

hint ""

if ((abs ((getDir tank) - (tankDir)) > 45) && (abs ((getDir tank) - (tankDir)) < 315)) then {hint "tracks fall off"}

goto "loop2"

edit : third updated version - checks total turned distance, absolute speed and can handle crossing north, can escape again and spreads ~delays smile_o.gif

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  

×