Jump to content

Recommended Posts

Spoiler alert for followers of the Defying the Odds Campaign who might be spoilers sensitive.

 

 

 

What I am trying to do is spawn two missiles which will collide mid-air. So I placed a car in the air and sent the two missiles. The car has no simulation but is shown to players. Everything works fine.

Next try I click the Show Model box making the car invisible to players. They cannot be able to see it while playing. What happens is that the missiles do not hit the car but the ground.

 

The code I use in a trigger so as to spawn the missiles:


 

[[11707.6,18444.8,1000], "ammo_Missile_Cruise_01", car1, 180, false, [0,0,0.25]] spawn BIS_fnc_exp_camp_guidedProjectile;

[[12900.8,18750.6,1000], "ammo_Missile_Cruise_01", car1, 180, false, [0,0,0.25]] spawn BIS_fnc_exp_camp_guidedProjectile;

 

I tried spawning an explosion when the two missiles come together like this:

 

"HelicopterExploBig" createVehicle (getpos car1);

 

but the missiles would not blow up.

 

In short the explosion and everything is great when the car is visible to everyone but not when it is invisible. Oh and I tried making it invisible only to players but I do not know how to do that.

 

So any ideas?

 

EDIT: Should the trigger spawning the missiles be set to server only? So as not to spawn missiles for every client. Since triggers are local.

 

 

Share this post


Link to post
Share on other sites

Try this:  Use a zodiac boat instead of a car, and use this command to make it invisible (but it will still be an active target-able object):

_y = 0;
{myZodiac setobjecttexture [_y,'']; _y=_y+1;} foreach getObjectTextures myZodiac;

This gives you an invisible but target-able vehicle.  Note:  the only issue with this is the boat will still make a shadow on the ground.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you so much!

 

I placed the code in the initPlayerLocal.sqf and it worked nicely. Only thing I had to change was the placement of the boat. When horizontal to the ground it would not be a big enough target for the missiles. Oh and the last } was not needed, for anyone else who will use the above.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, JohnKalo said:

Thank you so much!

You are welcome sir.  Glad it worked out for you.

  • Thanks 1

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

×