Jump to content
Sign in to follow this  
victimchild

Velocity is bugging me out!

Recommended Posts

I need to know the script to set the speed of somthing! Like if I am in a jet then I want to go 5 speed. (I will set the hight really high)HOW!?!

Share this post


Link to post
Share on other sites

There are only three speedmodes in OFP: slow, normal, fast

You select it in waypoints or with a command (?speed?)

The km/h speed value of slow/normal/fast is determined in the addon/unit, but I'm not 100% sure.

Sow your only easy possiblity is trying 'slow'.

Really complicated scripting would it be to keep your jet with unending setvelocity commands at 5 speed, facing the right direction and hoping the ai likes it.

Share this post


Link to post
Share on other sites

I only want him to start out at five then plumet and pull out of it before impact.

I know there is a script somthing like this to make it do that.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setvelocity [x,y,z]

I want to know do I put numbers in the place of x, y, and z? confused_o.gifhelp.gif

thx

Share this post


Link to post
Share on other sites

This is some code I use to shoot a plane forward in the air...it adds 100 to whatever direction the plane is facing. _v is my plane object.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_v setpos [(getpos _v) select 0, (getpos _v) select 1, 100]

_v setvelocity [100 * (sin (getdir _v)), 100 * (cos (getdir _v)), 0]

Hope this helps.

Doolittle

Share this post


Link to post
Share on other sites

It gives me an error report saying that the first _v is a local var in a global var's space.

Thanks for trying.

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  

×