Home   Help Search Login Register  

Author Topic: The "Leader" command and group unit names, need some help!  (Read 1496 times)

0 Members and 1 Guest are viewing this topic.

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
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: [Select]
_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: [Select]
_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: 25 May 2010, 00:38:24 by Ding »
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: The "Leader" command and group unit names, need some help!
« Reply #1 on: 25 May 2010, 00:47:41 »
So do you still need help? :)
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. ;)

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re: The "Leader" command and group unit names, need some help!
« Reply #2 on: 25 May 2010, 12:09:41 »
It's pretty much fine now, I'll just keep using trial and error from now on. Thanks for asking though :)
"If I remain lost and die on a cross, atleast I wasn't born in a manger"