Jump to content
Sign in to follow this  
ikzelion

help with chemlight

Recommended Posts

good at all

my problem is that I can not make a helicopter land on a chemlight.

I want to teleport an invisible helipad chemlight fired but I can not.

anyone know how to do?

Share this post


Link to post
Share on other sites

try it with an event handler "fired"

check if chemlight

createVehicle invisible helipad

update the position of the helipad

delete helipad after a small amount of time

Share this post


Link to post
Share on other sites

Im trying something like this... i call the choper to my positionwhith the fired eventHandler, but i cant move the invisible lz to the chemlight position... any help???

Share this post


Link to post
Share on other sites

init.sqf:

// Options.
SMOKEHELI_SmokeColor = "Chemlight_green";  // STRING - classname of the smoke grenade to look for.
SMOKEHELI_feedback = false; // BOOL - Yell smoke out like a boss?
if (isNil "SMOKEHELI_Active") then {SMOKEHELI_Active = false;};

// Function to check for smoke being thrown.
SMOKEHELI_fnc_addSmokeCheck = {

   // Add eventHandler for tossing smoke from Demonized
   _idx = player addEventHandler ["Fired", {
       if (((_this select 5) != SMOKEHELI_SmokeColor) || SMOKEHELI_Active) exitWith {}; // Not green so ignore it.

       // Green! Lets see where it lands.
       _null = (_this select 6) spawn {

           // Get current location of the smoke shell
           _posg = getPos _this;
           sleep 0.5;
           // As it rolls keep updating the location.  If it keeps rolling or jitters it's last pos when it disappears will be _posg.
           while {(_posg distance (getPos _this)) > 0} do {
               _posg = getPos _this;
               sleep 0.5;
           };

           //make sure helipad is at 0 elevation
           _posg set [2, 0];
           // Spawn invis helipad at the smoke to land on.
           _helipad = createVehicle ["Land_HeliPadEmpty_F", _posg, [], 0, "NONE"];

           // We've come to a stop and know where to fly so lets do it!
           // [[_posg, player], "SMOKEHELI_fnc_spawnReinforcements", false] spawn BIS_fnc_MP;
           if (SMOKEHELI_feedback) then {
               player sideChat "Smoke out!";
               playSound3D ["A3\dubbing_radio_f\data\Male02\RadioProtocolENG\Stealth\200_CombatShouts\ThrowingSmokeE_2.ogg", player];  // so lulz :)
           };
       };
   }];
};

_chemHeli = [] spawn SMOKEHELI_fnc_addSmokeCheck;

Share this post


Link to post
Share on other sites

What The.............. :O You are my Hero Kylania!!! I cant Belive... you make it work!!! THANK YOU!!! Works Perfectly... i cant Believe........

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  

×