OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MeltedAd on 29 Sep 2003, 09:57:44
-
Can a script be made so when a member of a group is wounded he shouts for a medic? I see there are three different Medic calls availible in the editor. would not a script detecting wounds be able to get that unit to call medic?
I only know alittle bit about scripting if someone can point me in the right direction i would be greatful.
-
Use the getdammage along with the action command for healing at medic. Although the getdammage is strange.
-
Use the getdammage along with the action command for healing at medic. Although the getdammage is strange.
i did a seach and couldn't find the action command for healing at the medic. do you know where i could locate this? it sounds interesting. :)
-
Look at the thread "The Time For Action Has Come!" at Ed/scripting general.
:beat: *Gets Mediced* :beat:
-
Place a trigger, and in the "activation" field, replace "this" with: getdammage man > 0. man is the name of the man you want to shout. Then press the "effects" button, and choose the appropriate medic sound.
That is about the simplest way to do it.
-
Ok I just put this little script together and it works perfectly.
-
Your script looks good, except for the very first part:
#health
_unithealth = Getdammage _unit
? _unithealth > 0.3 : goto "callmedic"
~5
?!(alive _unit) ; goto "exit"
goto "health"
This would be better if you used the @condition command, instead of doing a constant loop:
#health
@(getdammage _unit > 0.3) OR !(alive _unit)
?!(alive _unit) ; goto "exit"
goto "callmedic"
This would run better and reduce lag.
-
It is actually better to use a loop with a 5 second delay. The @ condition checks every .5 seconds, thus using more processor time (like a trigger).
-
Roger that.
-
Thanks guys ;D This is bloody perfect :thumbsup:I suppose a similar script could also shout "cover me", "Enemy spotted, open fire!" or "Let em have it" when the enemy is detected?
I just have two questions.
1/Would it be possible for the injured unit to roll around on the floor untill the medic gets to him and the healing process begins ???
2/Can the "Medic" call be louder???
-
1. Explain..?
2. Not with out making a new sound...
-
1: I think he means have the injured roll on his back like he does when being healed while prone. It's some sort of: This SwitchMove "FXLying...something" just look for it ;)
2: The only way I see it possible is to use the FadeMusic command but make it louder instead (possible ???).
Beware the GrimMonkey
-
The healing anime. Could this be looped or something to draw it out abit? So when a unit is quite injured he does the healing anime(rollin around) untill a medic turns up and heals him.
-
You could use switchmove in a loop.... but I dont know the switchmove for healing... plus you would have to force him on the ground: _unit setunitpos "DOWN" Well maybe I will update the script, but right now im workin on another one.... ::)
-
Ok he rolls around on the ground now when hes hit, but if I use the heal action he will heal at the medic before the medic even gets do him, so how do I would I make him to it if the medic was a certain distance away from him?