Welcome, Guest Friday 18th April 2014, 10:02:23
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: The "Leader" command and group unit names, need some help!  (Read 247 times)
0 Members and 1 Guest are viewing this topic.
Ding
Contributing Member
**
Offline Offline

Jurassic Park


« on: 24 May 2010, 23:13:38 »

Hey, heres the situation:

Basically I have created a generic West infantry group in the mission editor and have created a little script so that a marker will follow the squad leader on the players map, which goes like so:

Code:
_group = _this select 0
_marker = _this select 1

#loop
_marker SetMarkerPos Getpos Leader _group
~0.1
goto "loop"

Now the marker icon im using for the Leader of said group is a green flag, and I'd like all of the units in his squad to have green dots as their markers.. though heres my problem; is their a way to assign markers to the units of a squad without having to give said units individual names in the editor? the leader command works swell for the squad leader but I've not been able to do the same for his men.

any suggestions as to how I can do this without having to assign a name to each individual man?

edit: I've been trauling through some scripts, and tried this for a two man group:

Code:
_group = _this select 0
_marker1 = _this select 1
_marker2 = _this select 2

_listunits = units _group

#loop
_marker1 setMarkerpos getpos  Leader _group ;; Works Fine up until here
_marker2 SetMarkerpos Getpos (_listunits select 1) ;; caused error here, fixed now works like a charm
~0.1
goto "Loop"

edit #2: I've seen my stupid mistake!
« Last Edit: 24 May 2010, 23:38:24 by Ding » Logged

"If I remain lost and die on a cross, atleast I wasn't born in a manger"
RKurtzDmitriyev
Missions Depot Staff
*****
Offline Offline



« Reply #1 on: 24 May 2010, 23:47:41 »

So do you still need help? Smiley
Logged

The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. Wink
Ding
Contributing Member
**
Offline Offline

Jurassic Park


« Reply #2 on: 25 May 2010, 11:09:41 »

It's pretty much fine now, I'll just keep using trial and error from now on. Thanks for asking though Smiley
Logged

"If I remain lost and die on a cross, atleast I wasn't born in a manger"
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: