Jump to content
Sign in to follow this  
TheRedBaron

Setvelocity of a flare

Recommended Posts

Is there an easy way of setting the velocity of a flare, oh and can you set the velocity of a person to make them jump and such smile_o.gif just curious

Share this post


Link to post
Share on other sites

Theres a very good jump script on www.ofpec.com in the beta script board. The only thing it needs a jump animation.

Share this post


Link to post
Share on other sites

thank, Does any one know how to set the velocity of a flare though?

Share this post


Link to post
Share on other sites

May be a little more complicated since I don't think you can actually name a flare. You need to detect the flare then assign a velocity to it.

I just wrote a script to this and tested it - seems to work OK. Multiplies the velocity by a factor of XYZ. Can send flares very far. Use it and abuse it - modify it as you need. wink_o.gif

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

;// Quick script witten by BadBlood [STO]

;// Multiplies the velocity of a flare by a factor of XYZ

;//

;// - Place the following line in the init.sqs file

;//         player addEventHandler ["fired",{_this exec "FarFlare.sqs"}]

;// Change VelX, VelY, and VelZ to be the desired veloctity multiples

_VelX = 4

_VelY = 4

_VelZ = 8

;// Get the object fired

_Flare = nearestObject [vehicle(player), _this select 4]

;// Check to see if it's a flare - if not exit

?!(typeOf _Flare == "FLARE" || typeOf _Missile == "FLAREGREEN" || typeOf _Missile == "FLAREYELLOW" || typeOf _Missile == "FLARERED") : exit

;// Change the velocity

_Flare setvelocity [((velocity _Flare select 0) * _VelX),((velocity _Flare select 1) * _VelY),((velocity _Flare select 2) * _VelZ)]

exit

Share this post


Link to post
Share on other sites

You can name a flare that you camcreate. But you would need to detect it if it's being fired from the 203.

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  

×