04-27-2009, 12:19 PM
Code:
// function deathzone.sqf
private ["_units", "_trigger", "_unit", "_i"];
_units = _this select 0;
_trigger = _this select 1;
_i = 0;
_unit = _units select 0;
while (_i < count _units)
{
if("man" == typeOf _unit)
{
_unit setDammage 1;
};
_i = _i + 1;
};
Code:
[thislist, triggerName] call loadFile "deathzone.sqf"
I've tried for a while and can't get any of the above to work. Couldn't I just put:
Code:
"man" countType thislist >0
I can get this to work:
Code:
"_x setDammage 1" forEach thislist
But I can't get the below to work either...
Code:
_tmp = "Shell73" createVehicle getPos _unit;
_tmp setDammage 1;
deleteVehicle _tmp;
I understant the flip switch that Pulverizer explained and will need to use it.
I guess my coding experience is not good enough yet...
I had a look in OPFEC as I always do, that's where I got the initial ideas from but couldn't find any info on finishing it off...
What I'm trying to do is have a area and whenever a blueforce unit enters it a bomb (shell73 or LGbomb doesnt matter) is created at the units position and for any of the others that are in the unit's group as long as they are within the trigger area. It is to kill them so I could include the
Code:
_unit setDammage 1
Also where could I look up what is the difference between sqs and sqf?
Sorry for all the questions...
Marto