jandrews 117 Posted November 11, 2013 (edited) Hello, I am wondering if.... 1. I put a unit down, lower his health to "next" to nothing, place a trigger on him, saying "its a trap" and then he dies.... is this possible in trigger Act line? 2. also, I have civilian rebels, friendly with blufor by having my civilians grouped with officer of higher rank and in civilian dress, setting his probability of presence slider to zero and in my Init.sqf I added: EAST setFriend [CIVILIAN, 0]; CIVILIAN setfriend [EAST, 0]; I am wondering HOW can I set the civilians to be LIKE "setcaptive true" in order to complete a sabotage mission to blow a certain group of opfor units, then once opfor units are dead, a trigger then changes the civilians to LIKE "setcaptive false" by naming opfor groups (!alive ..) in trigger cond. line and (setcaptive false ...) in Act line. Lets say, opfor units in trigger cond. are as: !alive op AND !alive op1 AND !alive op2 AND !alive op3 and in Act line: don't know array. hopefully this 2nd question is clear. Is this possible. Any other ideas to have these 2 questions happen? thanks in advance for your time. Edited November 11, 2013 by JAndrews1 Share this post Link to post Share on other sites
Kunsa 10 Posted November 11, 2013 (edited) onAct: nul = [] spawn { _dyingGuy = ObjNull; "b_soldier_f" createUnit [_position, creategroup WEST, format["this setcaptive true; this setdamage 0.7;this switchMove ""acts_InjuredCoughRifle02""; %1 = this",_dyingGuy]]; waitUntil {player distance _dyingGuy < 5}; _dyingGuy lookAt player; sleep 1; _dyingGuy sidechat "*sputters*.. Its a Trap!"; sleep 2; _dyingGuy setDamage 1; }; :) I keep thinking of Family Guy... I didnt quite understand your second question. Edited November 11, 2013 by Kunsa lanoitpo Share this post Link to post Share on other sites
jandrews 117 Posted November 12, 2013 onAct: nul = [] spawn { _dyingGuy = ObjNull; "b_soldier_f" createUnit [_position, creategroup WEST, format["this setcaptive true; this setdamage 0.7;this switchMove ""acts_InjuredCoughRifle02""; %1 = this",_dyingGuy]]; waitUntil {player distance _dyingGuy < 5}; _dyingGuy lookAt player; sleep 1; _dyingGuy sidechat "*sputters*.. Its a Trap!"; sleep 2; _dyingGuy setDamage 1; }; :) I keep thinking of Family Guy... I didnt quite understand your second question. That looks very nice. Thanks for your help with question #1. Ok, for #2, basically I have a mission for civ guerrilla's to sabotage opfor vehicles in a town/base. What I have done already to make them get fired on from opfor is group the civ's to blufor squad leader's, set squad leader's presence to 0, then add Init.sqf: EAST setFriend [CIVILIAN, 0]; CIVILIAN setfriend [EAST, 0]; So what I am trying to do is allow the civ's to enter town/base, appear as civ's, set charges, once they blow, trigger for the opfor to ID civ's as enemy and fire on them. However initially I want them to just blend in as normal civ's in town. hopefully thats more clear, I know its detailed. sry. again thanks for your time. ---------- Post added at 03:52 ---------- Previous post was at 03:33 ---------- just FYI, I tried that just like it shows, placed an AI on map, placed a trigger over him and nothing. ideas? Share this post Link to post Share on other sites
Kunsa 10 Posted November 12, 2013 (edited) not sure what the answer is for the civs... I think once you set setcaptive true in front of some troops, even if you set it back, those troops dont recognize it(other troops you meet later on will fire on you) if your civs set setcaptive false and then fired on the opfor then opfor would attack the civs.. looking at the above, I didn't set the position in the above code... after testing it, I noticed there isnt a really good transition animation from this to death... but at least it works this time. you don't need to add an AI this time, just place a trigger, name it and insert the name into the code and then put it in the onAct field nul = [] spawn { private "_dyingGuy"; "b_soldier_f" createUnit [getPos NAMEOFYOURTRIGGER, creategroup WEST, "this setcaptive true; this setdamage 0.7;this switchMove ""acts_InjuredLookingRifle02""; _dyingGuy = this"]; _dyingGuy disableAI "MOVE"; waitUntil {player distance NAMEOFYOURTRIGGER < 5}; _dyingGuy lookAt player; sleep 2; _dyingGuy sidechat "*sputters*.. Its a Trap!"; sleep 2; _dyingGuy SwitchMove "AinjPpneMstpSnonWrflDb_death"; _dyingGuy setDir (getDir _dyingGuy +180) mod 360; _dyingGuy setDamage 1; }; Edited November 12, 2013 by Kunsa Blurgh Share this post Link to post Share on other sites
jandrews 117 Posted November 12, 2013 (edited) that works great. thanks. Regards to #2, is it possible to group the civ's together with: guerrillas = group this; at spawn, then with triggered event, (any Opfor unit killed), a blufor team leader spawns with zero presence and guerrillas are then grouped to team leader and with Init.sqf: EAST setFriend [CIVILIAN, 0]; CIVILIAN setfriend [EAST, 0]; added? I know its a lot, not sure if possible, also I am looking for a general trigger condition to just include any / all Opfor units, so then any opfor unit killed triggers the event. Thanks for your efforts. Edited November 12, 2013 by JAndrews1 Share this post Link to post Share on other sites
Kunsa 10 Posted November 12, 2013 when a unit dies, it changes side from whatever to civilian. not sure why. maybe to stop ai firing at it after its dead. that just means it is a bit trickier to check for dead opfor without a bit more complex check.. this just checks for anyone dead within the trigger area : {thistrigger distanceSqr _x < (2500)} count alldead > 0 ; just change the 2500 to whatever size you have set for your trigger area. the number is the square of trigger size ... i.e. size 50 = 50*50 = 2500. I havent tried it, but I wonder if you could join you civilians into a blufor group if that would change anything. for example: init.sqf: EAST setFriend [CIVILIAN, 0]; CIVILIAN setfriend [EAST, 0]; guerrillas = group this; //init on unit spawn then trigger onActivation: rebels = creategroup west; {_x setcaptive false} foreach units guerrillas; (units guerrillas) joinsilent rebels; deletegroup guerrillas; you wouldn't need to spawn the blufor team leader that way Share this post Link to post Share on other sites
jandrews 117 Posted November 13, 2013 so I have set it up as you have. nothing happens. Share this post Link to post Share on other sites