I've searched the forum and I've found this qoute from Macguba :
Dofollow only applies to units within the same group.
Perfect! Exactly what I need for my script in my mechanised infantry mission...but it doesn't work.
My squad is not grouped with the M113 and i'm a member, not the leader. When the squad disembark, the medic stays in. I did that to give my medic a bigger chance to survive, because you have to protect the M113 for enemy AT soldiers and when the M113 is destroyed , the mission is failed anyway.
When you got injured and you use the actionmenu (5-4) the medic won't react because he is in a vehicle. So I had to write a script (still in a beta phase) but it works... but there's something anoying.
Here are the 2 scripts :
gothit.sqs
_unit = _this select 0
_med = medic
_veh = M113
#loop
?!alive _unit OR !alive _med : exit
?not canstand _unit OR getdammage _unit > 0.5 : goto "action"
~2
goto "loop"
#action
_unit addaction ["Medic!!!","medicsupport.sqs"]
~10
#loop2
?getdammage _unit < 0.1 : goto "loop"
~2
goto "loop2"
exit
medicsupport.sqs
_unit = _this select 0
_med = medic
_veh = M113
?!alive _med : exit
_unit removeaction (_this select 2)
_veh stop true
~2
unassignvehicle _med
~1
_veh stop false
#loop
_pos = getpos _unit
_med domove _pos
? !alive _unit or !alive _med : exit
?getdammage _unit < 0.5 : goto "board"
~2
goto "loop"
#board
_med assignascargo _veh
[_med] ordergetin true
exit
The medic disembark, moves towards me and I can heal myself.
The anoying thing is :
_pos = getpos _unit
_med domove _pos
He will respons every 2 second with "ready and roger..." because I use Domove which is not silent. (enableradio false is not an option)
Move is silent but AFAIK only usefull on groups.
Commandmove doesn't work either.
So I want to use dofollow or commandfollow, but... no succes. The medic always return to formation.
So how does dofollow/commandfollow work?