Jump to content

Racketen

Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Racketen

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Racketen

    Cloaking

    So Im not sure this is still relevant but this is what I wrote for the original video: _source = "#particlesource" createVehicleLocal getPos SELECTED_UNIT; _source setParticleParams [["\A3\data_f\ParticleEffects\Universal\Refract.p3d",1,0,1,0],"","Billboard",1, 1, [0,0,.4],[0,0,1],0,1,1,0,[.25,3,.25,0],[[1,1,1,1],[1,1,1,1]],[1.5,0.5],0,0,"","",SELECTED_UNIT]; _source setDropInterval .1; However that was just me playing around a bit inside the editor. I made a multiplayer compatible version (however it has CBA as a dependancy), initPlayerLocal.sqf ["MPCloakToggle", { _unit = _this Select 0; _mode = _this Select 1; if (_mode) then { _source = "#particlesource" createVehicleLocal getPos _unit; _source setParticleParams [["\A3\data_f\ParticleEffects\Universal\Refract.p3d",1,0,1,0],"","Billboard",1, 1, [0,0,.4],[0,0,1],0,1,1,0,[.25,3,.25,0],[[1,1,1,1],[1,1,1,1]],[1.5,0.5],0,0,"","",_unit]; _source setDropInterval .1; _unit setVariable ["CloakVic", _source]; [_unit] spawn { sleep .4; (_this select 0) hideObjectGlobal true; }; } else { deleteVehicle (_unit getVariable "CloakVic"); [_unit] spawn { sleep .25; (_this select 0) hideObjectGlobal false; }; }; }] call CBA_fnc_addEventHandler; initCloak.sqf // callscript with 0 = this execVM "initCloak.sqf" from a units init line if (str player != str _this) exitWith {}; player setVariable ["CloakIsOn", false]; _OffId = player addAction ["Turn off cloak",{player setVariable ["CloakIsOn", false]; player setCaptive false; ["MPCloakToggle",[player, false]] call CBA_fnc_globalEvent;}, "",1,true,true,"","(player getVariable ""CloakIsOn"")"]; _OnId = player addAction ["Turn on cloak",{player setVariable ["CloakIsOn", true]; player setCaptive false; ["MPCloakToggle",[player, true]] call CBA_fnc_globalEvent;}, "",1,true,true,"","!(player getVariable ""CloakIsOn"")"]; player setVariable ["CloakOffActionID", _OffId]; player setVariable ["CloakOnfActionID", _OnId]; 0 = [] spawn { while {true} do { waituntil{!alive player}; player removeAction (player getVariable "CloakOffActionID"); player removeAction (player getVariable "CloakOnActionID"); waituntil{alive player}; _OffId = player addAction ["Turn off cloak",{player setVariable ["CloakIsOn", false]; player setCaptive false; ["MPCloakToggle",[player, false]] call CBA_fnc_globalEvent;}, "",1,true,true,"","(player getVariable ""CloakIsOn"")"]; _OnId = player addAction ["Turn on cloak",{player setVariable ["CloakIsOn", true]; player setCaptive false; ["MPCloakToggle",[player, true]] call CBA_fnc_globalEvent;}, "",1,true,true,"","!(player getVariable ""CloakIsOn"")"]; player setVariable ["CloakOffActionID", _OffId]; player setVariable ["CloakOnfActionID", _OnId]; }; }; I haven't bugtested it too much but it should get the job done... I know Im kind of late to the party, but maybe this will help someone at some point...
×