Jump to content
Sign in to follow this  
EBass

Spwaning Vehicles and Detecting Smoke.

Recommended Posts

Hey all, so I need to make two vehicles spawn, B_Lifeboats when a script detects that smoke has been thrown in a trigger area. So the smoke is thrown by a Blufor unit, it waits about two minutes and then two boats are spawned facing West, stationary and unlocked.

Thanks for the help!

Share this post


Link to post
Share on other sites

I think you have to use a fired eventhandler and check if the unit is throwing a smoke and if the unit is inside the trigger area.

Share this post


Link to post
Share on other sites

I used this to detect when green smoke has been used, not 100% tested for ammo types in A3.

Just place this in the throwers init box

this addEventHandler ["fired",{_this execvm "detect_smoke.sqf"}]

save as detect_smoke.sqf

//this addEventHandler ["fired",{_this execvm "detect_smoke.sqf"}]
_shooter = _this Select 0; 
_ammotype = _this Select 4;

//hint format["%1",_ammotype];

sleep 2;
switch (_ammotype) do
{

   case "SmokeShellGreen":
   {
      Hint "Green Smoke Detected";

  };

     case "1Rnd_SmokeGreen_Grenade_shell":
   {
      Hint "Green SmokeShell Detected";
   };

       case "FlareGreen_F":
   {
      Hint "Green Flare Detected";
   };

      case "3Rnd_SmokeGreen_Grenade_shell":
   {
      Hint "Green SmokeShell Detected";
   };

       case "UGL_FlareGreen_F":
   {
      Hint "Green Flare Detected";
   };

     case "3Rnd_UGL_FlareGreen_F":
   {
      Hint "Green Flare Detected";
   };
};

Replace the hint with the code you want to run or better to let it launch another script that does the spawning.

[] execvm "spawn_boat.sqf";

Sorry don't have time to go into that right now but there are several posts on spawning stuff.

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  

×