Jump to content
Sign in to follow this  
BLSmith2112

Cannot Change the Direction of this spawned missle

Recommended Posts

Here's the script (By GuiltyRoachKillar, not me)

Init Field:

Quote[/b] ][a54,"R_Hydra_HE",5] exec "explos.sqs"

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

_unit = _this select 0

_ammo = _this select 1

_height = _this select 2

_pos = getpos _unit

_x = _pos Select 0

_y = _pos Select 1

_z = ( _pos Select 2) + _height

_pos = [_x, _y, _z]

#b

bomb= _ammo createvehicle _pos

bomb2= _ammo createvehicle _pos

bomb setVelocity [0,-300 ,0]

bomb2 setVelocity [0,300 0]

exit

The missile spawns and shoots north. How can I reverse this -180? Rotating the trigger didn't do it, nether did rotating "a54"... Any ideas? Thanks!

Share this post


Link to post
Share on other sites

Actually two missiles are created - and according to their velocity settings, one flies north and the other south.

What is that script supposed to be for?

Edit - here's the code anyway:

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

_ammo = _this select 1

_height = _this select 2

_pos = getpos _unit

_x = _pos Select 0

_y = _pos Select 1

_z = ( _pos Select 2) + _height

_pos = [_x, _y, _z]

#b

bomb= _ammo createvehicle _pos

bomb setVelocity [0,-300 ,0]

bomb setVectorDir [0,-1,0]

exit

Share this post


Link to post
Share on other sites

Well MadDog, I'm trying to create a nifty ending to my film. Where the AH64 goes eye level with the evil enemy general, shoots a missile through the second story window and puts em into oblivion. It's simply a matter of getting the missle to appear near the ah64 and make it look like its firing a missile into the window. biggrin_o.gif

Edit:

Currently testing*

Share this post


Link to post
Share on other sites
Well MadDog, I'm trying to create a nifty ending to my film. Where the AH64 goes eye level with the evil enemy general, shoots a missile through the second story window and puts em into oblivion. It's simply a matter of getting the missle to appear near the ah64 and make it look like its firing a missile into the window. biggrin_o.gif

Hehehe biggrin_o.gif

Sounds a bit like the end of True Lies. If you want, I can help you a bit more with the scripting.

Share this post


Link to post
Share on other sites

Whoa you reply fast dude! I meant to say, when I saved last night on the mission, I forgot to name the chopper! So I named it back today. biggrin_o.gif So now Imma jump back in and give er' a quick test run again.

Edit: Tested it. The funny thing is:

A. I was using the Magazine Classname instead of the Ammo Classname. As to why the missile wasn't spawning to begin with (did that last night too, and forgot to save).

B. The missile now spawns, but goes north for like 3 meters and then wam! Stops, and goes 180 other direction biggrin_o.gif

I laughed for like 5 minutes, hehe, how can I get this wonderful missile to not go that other direction for those few meters.

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  

×