Home   Help Search Login Register  

Author Topic: medic question...  (Read 1453 times)

0 Members and 3 Guests are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
medic question...
« on: 13 Apr 2005, 07:52:19 »
I've  searched the forum and I've found this qoute from Macguba :
Quote
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

Code: [Select]
_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
Code: [Select]
_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 :

Code: [Select]
_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?


 



« Last Edit: 13 Apr 2005, 13:21:16 by Blanco »
Search or search or search before you ask.

bdfy1

  • Guest
Re:Dofollow/commandfollow doesn't work...
« Reply #1 on: 13 Apr 2005, 10:13:31 »
First of all:
Quote
doMove
Order unit to move to given position (silent)
doMove command  is _silent_ I've just checked it out. Don't confuse it with Commandmove
Second: Why  do you loop doMove ? Can't player stop and cover himself while waiting for medic ?
Third:AI behavior under fire is out of my understanding... :(
I spent about a day trying to make them retreating fast under enemy fire...
I used dyn_wp script , doMove,CommandMove, allowfleeng etc -  no result. Units get their orders , but continue to combat.
Now I'm trying to understand how HoldMalden mission from 1985 of. campaign is made , but It's rather complicated :(
May be you have the same problem ?

Offline Blanco

  • Former Staff
  • ****
Re:Dofollow/commandfollow doesn't work...
« Reply #2 on: 13 Apr 2005, 10:51:21 »
hmm, you are right. Domove is silent, I'm tired and confused atm :/
I heard the medic confirming every 2 second, but silent means that the leader shuts his mouth.

I modified that medicsupport script  and works much better now :

Code: [Select]
_unit = _this select 0
_med = medic
_veh = M113

?!alive _med : exit

_unit removeaction (_this select 2)

_veh lockwp true
~1
unassignvehicle _med
~1
_veh lockwp false
#move
_pos = getpos _unit
_med domove _pos

#disloop
?unitready _med : goto "checkdistance"
? !alive _unit or !alive _med : exit
;hint format ["%1m",_med distance _unit]
~1
goto "disloop"

#checkdistance
if (_med distance _unit <= 4) then {_med stop true; goto "heal"} else {goto "move"}

#heal
? !alive _unit or !alive _med : exit
? (_med distance _unit > 4): _med stop false;goto "move"
?getdammage _unit < 0.2 :_med stop false; goto "board"
~2
goto "heal"

#board
?!alive _veh : _med domove (getpos _med);exit
_med assignascargo _veh
[_med] ordergetin true
exit


PS : I just tried HoldMalden in the editor, nice mission, a bit short but still OK. When they have to pull back ,- believe it or not - they've used a stealth waypoint/ normal speed/ open fire, engage at will.  :o

But I still don't know how dofollow or commandfollow work...




« Last Edit: 13 Apr 2005, 11:46:27 by Blanco »
Search or search or search before you ask.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Dofollow/commandfollow doesn't work...
« Reply #3 on: 13 Apr 2005, 11:19:52 »
...Follow orders the unit to follow their group leader, it's the script equivalent to 'return to formation'.  Whether they stay there presumably depends on the behaviour and combatmode.

As an alternative - have you tried simply grouping the medic in cargo with the M113 and seeing what happens in response to an 'injured' call from you using the radio menu .  Medics seem to respond automatically to AI calls so he may sort himself out if you ask him nicely.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Dofollow/commandfollow doesn't work...
« Reply #4 on: 13 Apr 2005, 11:23:15 »
I've never used commandFollow.    On doFollow I'm not an expert, but my understanding is that it is basically "return to formation".   In other words it really only makes sense when you have a loon out of formation (due to a script for example) and you want him to return to control of his group leader.

But don't hold me to any of this ... my investigation was a long time ago and I ended up not using it because it didn't do what I wanted.

I would suggest you issue the doMove command only once.     Run the loop only to check if he has done the healing.    Once he is out of the wagon and has moved to your position he should be allowed to join the group as normal.   If you've moved away you can then call him as usual.   He may also be needed to heal other members of the group.
Plenty of reviewed ArmA missions for you to play

bdfy1

  • Guest
Re:Dofollow/commandfollow doesn't work...
« Reply #5 on: 13 Apr 2005, 11:27:41 »
Blanco
I guess you have already looked through Comref... I won't teel you more :(
I'm really delighted with how BIS make HoldMalden mission. They used just a single script for paratroopers, but  mission is nice - dynamic plot, bombarding an area , armour support etc - only using WP and Triggers...
Anyway I guess, I have to fing another way to make my units pull back...

Imagine: Convoy - several squads moving in Urals ( drivers are separate group , and three squads in cargo without WP ) . They get into serious truoble and have to retreat out of the road... How do I move them to a certain position for regrouping? I 've just ran out of ideas :(
 

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Dofollow/commandfollow doesn't work...
« Reply #6 on: 13 Apr 2005, 11:35:20 »
bdfy 1, post that in your own thread with a little more detail.   I'm sure we can come up with something.

BIS mission making is often quite elegant.   You can learn a great deal by studying it:  I wish more people would do it instead of just assuming that the answer is a script.    Sometimes it is but sometimes it isn't.

Plenty of reviewed ArmA missions for you to play

Offline Blanco

  • Former Staff
  • ****
Re:Dofollow/commandfollow doesn't work...
« Reply #7 on: 13 Apr 2005, 11:55:29 »
Quote
As an alternative - have you tried simply grouping the medic in cargo with the M113 and seeing what happens in response to an 'injured' call from you using the radio menu .
 

Great idea , but nope... the medic does not respond to my calls or those from my teammates when I group him with the M113.

Quote
Medics seem to respond automatically to AI calls so he may sort himself out if you ask him nicely.
Yes, they do but not when they are in a vehicle, not to player, nor AI. And I said pleazzzze, but no...
My script only works when the player got hit, I have to modify so it works with AI too.



 
 
« Last Edit: 13 Apr 2005, 13:16:50 by Blanco »
Search or search or search before you ask.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Dofollow/commandfollow doesn't work...
« Reply #8 on: 13 Apr 2005, 12:26:22 »
A bit more lateral thinking - if a medic does his stuff when he's not in a vehicle, why not simply turf him out of the vehicle when one of the group is injured (damaged but alive) then let him do his stuff under engine control?  A trigger-based approach should cover both AI and player:

Repeating trigger
Timeout delay, say, 3-10 seconds
Condition: Alive mymedic && (({Alive _x && Damage _x > 0.3} Count Units Group player) >= 1)
On Activation: UnassignVehicle mymedic
On Deactivation: mymedic AssignAsCargo myM113; [mymedic] OrderGetIn true

In theory, if the medic gets out and the injured party then gets killed, he will remount.  In practice it may all fail spectacularly because it's subject to the standard 'unchecked/untested' disclaimer!

Offline Blanco

  • Former Staff
  • ****
Re:medic question...
« Reply #9 on: 13 Apr 2005, 15:36:07 »
Quote
In theory, if the medic gets out and the injured party then gets killed, he will remount.  In practice it may all fail spectacularly because it's subject to the standard 'unchecked/untested' disclaimer!

Untested or not, it works PERFECT! :thumbsup:
The medic remount when the injured got killed.
Strange thing is that it doesn't work when I group the medic with the M113.
The medic doesn't even disembark.  ???
So what , it works when he's in my group.
Actually this is a great way to use your medic, he saved many people in my mission without being cannonfodder.

Thanksalot!


 
« Last Edit: 14 Apr 2005, 23:22:15 by Blanco »
Search or search or search before you ask.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:medic question...
« Reply #10 on: 13 Apr 2005, 15:52:27 »
Quote
Strange thing is that it doesn't work when I group the medic with the M113.
The medic doesn't even disembark.
Well, if the M113 is not on support WP the other AI not in the same group as the injured dude does not know he is injured...
(Nor do they know about the enemy the other group spots...)

Altough the AI carries a radio, they still talk only to their own team mates, not to other teams...

So, if the medic is in the same group as the injured dude he will disembark and help the wounded, but if not in the same group the medic does not know that someone from some other group is hurt and he just sits in the tin can drinkin' his java...
Unless you put the M113 on a support WP... That usually makes the medic run to whom ever has been hurt...

This is just afaik,I can be wrong... ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:medic question...
« Reply #11 on: 13 Apr 2005, 19:17:56 »
Quote
Blanco: Strange thing is that it doesn't work when I group the medic with the M113.
The medic doesn't even disembark.

HateR_Kint: Well, if the M113 is not on support WP the other AI not in the same group as the injured dude does not know he is injured...

Blanco,

Could you use your "groupchain" script to detect that one of the units in another group is injured and then have him tend to the injured unit while still grouped to the m113? Not exactly sure how your script works, and even more about how AI reacts to injured units, but I had just read up on the differences between "infoshare" and "grouplink" in this topic and GB stated:

Quote
Whenever a unit gets injured, groupchain will kick in

Just a thought.

Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:medic question...
« Reply #12 on: 13 Apr 2005, 22:32:52 »
Thought I'd seen it happen - have just checked that medics and wounded will automatically seek each other out even if they're not in the same group.  The trigger condition just needs to be expanded if you want him to cover other groups.

There is a slight qualification:  if you are the leader of the medic, he needs to be set to 'engage at will' to act on his own initiative.