OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Killzone on 07 Jul 2003, 18:22:18
-
Hi.
Is there a way to have the names of the ones that died show up on the screen using text. For example if I tell my men to go over to a certain area
and I then hear gun fire. Everytime my men shoot someone it will tell me on the screen like: "Sergei is dead" I dont know if I explained this right but if you can help it would be appreciated ;D
-
hi
;)this is not hard at all.
set up a script, and execute it with a this condition trigger, activate by west, since you said, "when you enter an area"
#a
~.001
?alive <soldiername>) : goto "a"
titletext ["Sergei is dead", "PLAIN DOWN"]
set up tests like this for every soldier
-
accually it should be:
#check
~0.1
!alive <soldiername>:goto "a"
goto "check"
#a
hint "Dude1 is dead" ;or u can use a titletext thing
exit
or you can do teh same thing inside a trigger instead of a script, just change condition to !alive <soldiername>
and on activation to hint "Dude is dead" or the titletext thing
-
we (da EC 8)) gonna realese kool script dat wil do it (we got som misions w/ dis script already ;)) - so ur friends say over da radio "ohh no unitname is down" ;D
just wait til our webmaster (asmodeus) updates da site (or just go nd ask him in IM ;D)
LCD OUT
-
Hey this works great but now I have a new question if you don't mind?
how can I get the text to dissapear after 1 or 2 seconds or have it show more than one dead at the same time.
My problem is when a soldier dies the hint comes up and says: Sergei is dead but as long as that is on the screen it does not report any other deaths even though some died
Thanks in advance ;D
-
Or you could have a loop like this :
_group=_this select 0
_i=0
#loop
_num=(count units _group)
?!(alive (units _group select _i)):hint format ["Oh no ! %1 is dead", name (units _group select _i)];[units _group select _i] join grpnull
_i=_i+1
?_num==0:exit
? _i>= _num :_i=0
~0.001
goto "loop"
Implementation : [_mygroup] exec "casualties.sqs", in a trigger with "true" in the condition field, for instance...
*edit*
Instead of "hint", you could use :
leader _group sidechat format ["Oh no ! %1 is dead", name (units _group select _i)]