-
Content Count
2658 -
Joined
-
Last visited
-
Medals
Everything posted by demonized
-
Trigger action visible only to the player who launched it?
demonized replied to finguide's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
on act: (vehicle player) setFuel 0; triggers beheave local in MP so should be no problem there. -
Help with landing UAV
demonized replied to panther42's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
maybe this command works for UAV too: http://community.bistudio.com/wiki/landAt -
Detecting "downed pilots"
demonized replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
clients can spawn AI no problem, if downed pilot is found on player/client, and he spawns the units no problem. the above condition will never fire on the server, however this will, but only once until all players are above 2 meter again. ({(getPos _x select 2) < 2} count playableUnits) != 0 -
Squad leader issues with mounting vehicles! WTF/HELP
demonized replied to avibird 1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try using (units _from) orderGetIn false; after the unassignVehicle part. -
Spawngroup and Taskpatrol
demonized replied to Gelly's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Save this as scriptName.sqf and when you need to spawn anything, run this code: _null = ["markerName",500] execVM "scriptName.sqf"; markerName is where they spawn and the area they will patrrol, 500 is the ca diameter from center of marker wich they will patrol, (will patrol within this range). scriptName.sqf // BIS_TK_INS cfgGroups infantry, group will be selected randomly from this. _TK_INS_groups = ["TK_INS_Group", "TK_INS_Patrol", "TK_INS_AATeam", "TK_INS_ATTeam"]; waituntil {!isnil "bis_fnc_init"}; _markerPos = getMarkerPos (_this select 0); _grp = [_markerPos, east, (configFile >> "CfgGroups" >> "East" >> "BIS_TK_INS" >> "Infantry" >> (_TK_INS_groups select (floor(random(count _TK_INS_groups)))))] call BIS_fnc_spawnGroup; [_grp, _markerPos, (_this select 1)] call bis_fnc_taskPatrol; Edit: remember to place the functions module on map. -
if all zombies are for example opfor, you could simply run a continous loop to add the reveal to them, a little change to celerys code. For example, if all zombies are opfor (EAST) and are spawned randomly throughout the mission: save script and run it from init.sqf or a init somewhere. Will reveal units closer than 300 to teamleader to all opfor teams each 10 seconds, no need to specify groups as script updates each turn (10 seconds) if (!isServer) exitWith {}; while {true} do { { if (side _x == east AND (count (units _x)) > 0) then { _grp = _x; { if ( ((leader _grp) distance _x) < 300) then { _grp reveal [_x,4]; }; } forEach allUnits; }; } foreach allGroups; sleep 10; };
-
Continuously Delete Civillians In A Trigger But Not Empty Blufor & Opfor Vehicles?
demonized replied to Heaney's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah, i just guessed first with getText civilian instead of number before i checked Six config browser :D Edit: however there was required some additional code since vehicles seems to be taken first in thisList so passengers exited vehicle upon delete and trigger never reactivated, hence the iskindof and crew part of code. And the condition part needed to be so or use a global variable to turn on / off trigger since empty bluefor vehicles registrers as civilian and they also stopped the trigger from reactivating. -
Continuously Delete Civillians In A Trigger But Not Empty Blufor & Opfor Vehicles?
demonized replied to Heaney's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Edit 2: tested in SinglePlayer civilian present repeated trigger. condition: ({(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 3} count thisList) > 0 on act: { if (!isNull _x AND (getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 3) then { if (!(_x isKindOf "Man")) then {{_x setPos (getPos _x); deleteVehicle _x} foreach crew _x}; _x setPos (getPos _x); deleteVehicle _x; }; } foreach thisList; Edit again, added _x setPos (getPos _x); to code outside iskindof check, reason: bus filled with civvis failed to delete all and caused massive FPS drop. Now working without lag. -
Undefined variable error BIS_fnc_selectRandom
demonized replied to bigshotking's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
edit: nvm -
preprocess function to call inside init line?
demonized replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I use _null all the time in outer editor fields, have been for years, never been a issue for me. It will however not do if you need to reference it with scriptDone command after, wich is bugged somewhat in latest patch anyway. -
preprocess function to call inside init line?
demonized replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you could also just use a spawn in the init waiting for the function to be ready for use. place a variable = true; at end of the compiled file. use spawn in init of units or the script that handles the inits. _null = this spawn {waitUntil {!isNil "variable"}; lobj1 = [ [getpos [b]_this[/b] select 0, getpos [b]_this[/b] select 1, 2], [0.0, 0.5, 0.5], 0.05] call Fnc_CreateLight}; Now every units init will wait for function to be ready, then run as expected. And as Sickboy pointed out, this is used in editor, and translates to _this inside the spawn. -
Detecting "downed pilots"
demonized replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if its MP, then triggers beheave like local triggers for players afaik. so a simple condition: (getPos player select 2) < 2 and on act: nul = [player] execVM "spawnGroundHostiles.sqf"; should suffice, though you should add in type check or use setVariable getVariable to differenciate "downed pilots" and "CSAR" units, else script will fire for each of players below 2, unless that does not matter for you. If triggers are set to repeatedly, downed players need to be out of trigger area before it can activate again ofc.. -
Enemy Units Spawn Script based on Count -- Help!!!
demonized replied to carlostex's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_au = {alive _x AND side _x in [WEST,EAST]} count [url="http://community.bistudio.com/wiki/list"]list[/url] triggerName; -
How can I re-use group name/pointer
demonized replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
To reuse any variable, simply assign it to something else, but im obviously not getting the question right here. Can you give some more context? -
Respawn Deserted Vehicles script and Clone AI Players on Restart
demonized replied to mycatsaid's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Cant help you with the actual problems you have, but here is where to post any Domination related questions, your best bet of a working solution. http://forums.bistudio.com/showthread.php?t=104827 -
Mission complete despite dying?
demonized replied to mcnools's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
One way to work around the custom end is to fake it with a new unit on killed eventhandler. Demo mission OA required -
Couple of questions
demonized replied to DieselJC's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
same way as units, press delete when mouse is over marker in editor ;) -
move to random marker wp script
demonized replied to dematti's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
reworked script, using a very primitive respawn. Demo mission OA required Edit: Link updated with vehicle fix. -
Couple of questions
demonized replied to DieselJC's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
1: use descriptive titles, yours will not help anyone else trying to search forums for a answer. 2: use search: http://forums.bistudio.com/search.php all questions have been answered in lenght numerous times, atleast 1 and 2. for 3 press markers in editor and youll see the marker you mention. -
Making a group forget about its enemies
demonized replied to camo1018's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ye youre right, brainfart there :) -
makes any AI dead: this setDammage 1; although i think there are a small amount of static dead/bodybags used in A2...
-
Making a group forget about its enemies
demonized replied to camo1018's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
in patch 1.60 knowsabout command is altered to force a number, i think you could force 0 in knowsabout value, though wiki is not yet updated with 1.60 info, so youll need to roam the beta or RC topics for instructions. i think it was something like this: spotterName knowsAbout [targetName,0]; -
Scripting Trigger - Play Effect when Unit Kills
demonized replied to stingfish74's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Follow F2k Sel´s instructions with description.ext and use the eventhandler example below. But here is how you auto assign the eventhandlers to all opfor by simply placing this code in 1 unit init or init.sqf, so you dont have to manually paste the code in all units. Though i wonder if its correct syntax used? differs from wiki and what i know. { if (side _x == east) then { _x addEventHandler ["killed", "{if (_this select 1 == _x) then {_x say ['ahh',0]} } count units group player "]; }; } foreach allUnits; Basically what code does: Its same code as F2K Sel posted (hint removed), it goes over all units in mission, if unit is a east unit it will get the eventhandler. make sure to alter the 'ahh' to whatever sound file you use. Also: You mention you want the 6 sounds to be dynamic, i asume you mean a random sound is played each time. If so, this is how you do instead of above code. What the 1 number in the say command wiki example is i have no idea, also it seems say uses 3 params??? typo in wiki maybe? or optional... Anywho, you see code goes through all units once, if side is east then eventhandler is assigned to unit. eventhandker checks if the killer is in player group, then if so it selects 1 soundname from the _sounds array(these are the sounds you have in description.ext and then it plays that sound, it will be a random sound every time. { if (side _x == east) then { _x addEventHandler ["killed", { _killer = _this select 1; if ( _killer in (units (group player)) ) then { _sounds = ["ahh","got_him","boojaa","u_rock",suck_it_biatch","whos_next"]; _sound = _sounds select (floor(random(count _sounds))); _killer say [_sound,1,5]; }; ]; }; } foreach allUnits; -
Scripting Trigger - Play Effect when Unit Kills
demonized replied to stingfish74's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
addEventHandler the "killed" type. -
machinegunners in stealth group
demonized replied to ron_mexico's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
have you tried the disableAI "FSM" command? it is present in patch 1.60.