-
Content Count
2658 -
Joined
-
Last visited
-
Medals
-
Retain leadership of AI in multiplayer co-op using team switch
demonized replied to jassida's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Dont think that works in MP, but i hope i am wrong. If that does not work, try a simple loop in unit init. _null = this spawn { if (!local _this) exitWith {}; while {true} do { waitUntil {sleep 0.5; alive player AND player != leader (group player)}; (group player) selectLeader player; }; }; will run until mission end, and when player is alive and not a teamleader, he will be teamleader. -
Activate trigger when specific unit NOT present?
demonized replied to Niklas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
a trigger with anybody present END type trigger Condition: !alive HVTname OR !(HVTname in thisList) on act: hint "HVTname is either dead or not in the area anymore - mission end"; -
Getting Multiple boats empty??
demonized replied to spookygnu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
modifying code from DreadedEntity, using assignedCargo to get only passengers of boat. //code assumes all the boats are named using the editor { { _boat = _x; //dead units can't get out so there's no point in wasting processing time ordering them to if (alive _x AND _x in (assignedCargo _boat)) then { unassignVehicle _x; doGetOut _x; }; } foreach crew _x; } forEach [boat1, boat2, boat3, boat4]; -
Get the reason of the death of a player.
demonized replied to raptor2x's topic in ARMA 3 - MISSION EDITING & SCRIPTING
must be related to the wasteland revive system, check in there to find what gives suicide and do your code around that. best ask in wasteland thread. -
Get the reason of the death of a player.
demonized replied to raptor2x's topic in ARMA 3 - MISSION EDITING & SCRIPTING
using isKindOf command witk the cfgVehicles list and you can get loosely or very specifically what killed the unit together with a "killed" eventhandler; note that this is not the cfgVehicles list for arma3, but will give you an idea what to search for when using subgroups, Landvehicle is car is hmwwtow, air is helicopter etc... example: this addEventHandler ["Killed", { _killer = _this select 1; _vehicle = vehicle _killer; if (_vehicle isKindOf "Man") then { hint "its a man"; }; if (_vehicle isKindOf "Tank") then { hint "its a tank"; }; if (_vehicle isKindOf "Plane") then { hint "its a plane"; }; if (_vehicle isKindOf "Helicopter") then { hint "its a helicopter"; }; if (_Vehicle isKindOf "HMMWVTOW") then { hint "its a hmww with tow missiles"; }; }]; -
Using triggerAttachVehicle to sync a Trigger to a Group
demonized replied to travhimself's topic in ARMA 3 - MISSION EDITING & SCRIPTING
try this: place in the init of one of the groupmembers, myGroupName = group this; use the count command with alive in the trigger statement. _emptytrigger setTriggerStatements["{alive _x} count units myGroupName == 0", "hint 'group killed'", "hint 'done'"]; -
youre absolutely right, my bad, was at work writing with phone, and obviously not focused :) try this place a global variable in init.sqf: zone1 = true; place a trigger with anyone present, repeatedly. in condition place: zone1 and this on activation: {_x setDammage (getDammage _x + 0.1)} foreach units thisList; zone1 = false; on deactivation: zone1 = true;
-
Easy way: repeatedly trigger. Anyone present. { _x setDammage 0.1; } foreach (units thisList); Where you can change amount of damage and the time on trigger. Will damage alle units inside trigger x amount / seconds. ---------- Post added at 11:20 AM ---------- Previous post was at 11:15 AM ---------- Can also use a if statement to determin if unit is in a vehicle or not inside the foreach statement. if (vehicle _x == _x) then {_x setDammage 0.1};
-
trigger condition !alive
demonized replied to larcenn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe add in setTriggerActivation -
Prevent Player from Taking Objects
demonized replied to Kydoimos's topic in ARMA 3 - MISSION EDITING & SCRIPTING
from another thread the solution was to weapon setDammage 1; -
wrong classname for toolkit.. "ToolKit"
-
https://community.bistudio.com/wiki/addMagazineCargoGlobal upon seeing it will be globally broadcasted, i would think you might need to enclose it to only server. if (isServer) then {this addMagazineCargoGlobal["100_Rnd_762_Mag_Belt_TR",30]}; its all depending on type of "respawn" and if you process init or just run the code in the respawn script. Only run the code once, no matter how you do things.
-
you call the script with //nul = [this] execVM "AAF_Ammo.sqf"; wich would make the crate _this select 0 in the script itself, but you are using _this wich will actually make _this [this] in the script, wich obviously is wrong
-
just make use of the condition parameter in addAction: this addAction ["Heal self", "(_this select 1) setDammage 0", nil, 6, true, true, "", [color="#FF0000"]"(getDammage _target) != 0 AND _this == _target AND 'Medikit' in (items _this)"[/color]];
-
Get AI passengers out of Ghosthawk helicopter? Player is the pilot.
demonized replied to jakeplissken's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I havent looked at that script in years, i will take a look when i get the chance to.