OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Dane on 28 Mar 2005, 02:59:27
-
Can i take a dead guy from this array: _guards = [g1,g2,g3,g4,g5] and put him in this array _deadguys =[]?
And if so, how do i do that?
-
Not tested.
{if (!alive _x) then {_deadguys = _deadguys + [_x]}} forEach _guards
edit : removed a curled bracket
-
ahh thanks, i'll try it out.
-
I think this works but i'm having a little trouble with my script,.
How do i select a unit from the _guards array and select another dude from the _deadguys array, and then check if the _guard knowsAbout _deadguy?
The script should check if any of the _guards knowsAbout _deadguys since the _guards aren't grouped.
-
Can be done, but I can't help you now, I'm not at home
Maybe you run a loop to check the knowsabout value between every guard and every deadguy and put these values in a new array _known =[]
There is a script in the editor depot, it works perfect but it's not easy to use.
http://www.ofpec.com/editors/resource_view.php?id=241
*edit*
Strange , I"m sure I have another version from that script...It checks if there aren't any objects on the map that could hide the body or block the guards view...and that was not easy to determine.
-
Thanks, i'll have have a peek at that.
I have been peeking at Keycat's grouplink script and and found something interesting with the knowsabout but i'm still a newbie scripter so i haven't figured it out yet. ;)