Home   Help Search Login Register  

Author Topic: Group Leader  (Read 666 times)

0 Members and 1 Guest are viewing this topic.

calvinjune

  • Guest
Group Leader
« on: 27 Oct 2003, 23:47:08 »
here's a little tracking script i worked up; it's not really different from anything else like it out there.

;[tracker,tracked] exec "track.sqs"

_Tracker = _this select 0
_Tracked = _this select 1

#Loop

_Tracker move getpos _Tracked

~5

goto "Loop"


problem is, if the leader of the tracker group is killed, the entire group stops tracking. how can i make the script give the move command to the new group leader?

m21man

  • Guest
Re:Group Leader
« Reply #1 on: 27 Oct 2003, 23:51:49 »
Code: [Select]
_trackers = _this select 0 (Group name)
_tracked = _this select 1

#Vars
_primary = leader _trackers

#Loop
?(not alive _primary): goto "Vars"
_primary domove getpos _tracked
~5
goto "loop"

#Exit
exit

Not guaranteed that this will work :P .
« Last Edit: 27 Oct 2003, 23:52:53 by m21man »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Group Leader
« Reply #2 on: 28 Oct 2003, 00:02:02 »
[tracking group,tracked group ] exec "track.sqs"

_Tracker = _this select 0
_Tracked = _this select 1

#Loop

(leader _Tracker) move getpos (leader _Tracked)

~5

goto "Loop"


Guaranteed to work :P
« Last Edit: 28 Oct 2003, 07:11:32 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

m21man

  • Guest
Re:Group Leader
« Reply #3 on: 28 Oct 2003, 01:10:14 »
My idea wasn't practical :P . Use General Barron's. Also remember to account for either the trackers or the tracked being wiped out:
Code: [Select]
...
#Loop
?(count (units group _tracker) == 0): goto "exit"
?(count (units group _tracked) == 0): goto "exit"
(leader _Tracker) move getpos (leader _Tracked)
...
#exit
exit
« Last Edit: 28 Oct 2003, 01:10:41 by m21man »

calvinjune

  • Guest
Re:Group Leader
« Reply #4 on: 28 Oct 2003, 03:12:25 »
neither of those are working. the leader still dies and the group stops.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Group Leader
« Reply #5 on: 28 Oct 2003, 07:12:27 »
Please post the mission so I can see what's going on.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

calvinjune

  • Guest
Re:Group Leader
« Reply #6 on: 29 Oct 2003, 09:07:39 »
never posted a mission here before. sorry.

how?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Group Leader
« Reply #7 on: 29 Oct 2003, 12:14:02 »
When you are writing a post there is a box at the bottom of the screen called Attach      Use the Browse button to find your file.
« Last Edit: 29 Oct 2003, 12:14:19 by macguba »
Plenty of reviewed ArmA missions for you to play