OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pr0ph3t on 01 Apr 2005, 22:03:23
-
heheh just kidding.
I want a little island with 30 men on it and every time you approach one it joins your group if you have under and up to 12 men. Is there a quick trigger way to do this?
-
A nice little script that will teach you how to do this can be downloaded from the editors depot:
http://www.ofpec.com/includes/download2.php?id=157
The script takes units from other groups to replace losses in your own squad.
-
That's a pretty good tut.. I thought I had read every one in existence.. However, I'm thinking of more of a trigger way to do this.
Is there a way to do this through the init field of a unit and a big trigger?
-
Dunno if this'll work. Should work in theory.
_array = [loon1,loon2,loon3,etc]
_i = 0
#loop
? ((player distance (_array select _i)) < 10) : [(_array select _i)] join (group player)
_i = _i + 1
? _i > count _array : _i = 0
~0.05
goto "loop"
:beat: *Gets Shot* :beat:
-
This does look very convincing. I'll post my results when I'm at this point
-
I think ECP includes a feature a bit like this.