Search the Community
Showing results for tags 'create unit'.
Found 1 result
Hi everyone I hope you are all well this days.. I continue to work on one mission I have started before corona and now I try to make it live finally. Old problem is still problem and I will try to explain as clear as I can (that is not real problem, just mine short knowledge) so: I manage to create vehicle and put crew inside, set patrol areas with random waypoints, also infantry groups etc... Thing I can not figure out is how to create trigger to react on those units and vehicles due to fact they have not Variable names because they are not placed from eden but through very beautiful scripts for me from SayUnkl https://www.youtube.com/watch?v=Z7l1vvd91ak and this superguy https://securitronlinux.com/bejiitaswrath/how-to-spawn-a-randomly-placed-building-in-arma-3/. Now I am trying to create a triggers and ask them to monitor this scripted units and vehicles in the ways that triggers react on units death, wounding and similar states.. CLEAR EXAMPLE: _mrk = "m2"; _area = markerSize _mrk; _nul = _area pushBack markerDir _mrk; _nul = _area pushBack ( markerShape _mrk isEqualTo "Circle" ); _pos = [ _mrk, _area ] call BIS_fnc_randomPosTrigger; _randPos = [_pos , 0, 800, 12, 0, 10, 0] call BIS_fnc_findSafePos; _veh = createVehicle ["I_G_Van_02_vehicle_F", _randPos, , 0, "NONE"]; createVehicleCrew _veh; so I create this van vehicle inside marker called m2, now I need to know when vehicle is destroyed. Placing triggers in eden and making them simulation enabled and not isn't working because area of vehicle probability placing is random and big and collision with other trigger areas impacting them. Second solution was to set triggers condition to "thisList" but it is impossible because I dont have Variable Names which will eventually meet the conditions of triggers again same reason - units and vehicles are placed through scripts. So my question is how to script trigger and connect it to scripted vehicles/units? CODES I TRIED: _mrk = "m1"; _area = markerSize _mrk; _nul = _area pushBack markerDir _mrk; _nul = _area pushBack ( markerShape _mrk isEqualTo "Circle" ); _pos = [ _mrk, _area ] call BIS_fnc_randomPosTrigger; _randPos = [_pos , 0, 3000, 12, 0, 10, 0] call BIS_fnc_findSafePos; _veh = createVehicle ["B_APC_Tracked_01_AA_F", _randPos, , 0, "NONE"]; createVehicleCrew _veh; sleep 3; _trg = createTrigger ["EmptyDetector", getPos player]; _trg setTriggerStatements ["!alive _veh", "hint 'veh oboren'", "hint 'trigger off'"]; //and or _trg setTriggerActivation ["_veh", "not present", true]; Last 3 lines of code is my creation only and trying to hit the target, not a code from some authors like other parts are. Thanks everyone who can tell me something about this and maybe give final solution //sorry on my English it is far from best, I know..