OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: wi77ard on 07 May 2005, 10:09:47
-
hiya
basicly i want to be able to create blackouts and crosshair wobbles for a player when his stamina drops too low, i have a script reducing stamina for each player.
when i tried doing this before it happened for everyone not just the player i was trying to get it to work on
please help
-
i rememebr seeing something like this in the editors depot when the player has been shot after a while he kind of faints same with running long distances he starts to faint
i will have alook some time and se if i can get a link for you
-
thanks
-
bump
any other offers?
-
attach a hit eventhandler to the units you want a possible blackout for
and then run something like the following script from it
_unit = _this select 0
#START
~2
?(getdammage _unit >0.8): goto "HURTBADLY"
?!(alive _unit): exit
goto "START"
#HURTBADLY
_possibility = random 10
?(_possibility >9): goto "BLACKOUT"
exit
#BLACKOUT
titlecut ["You are unconscious","black out",0.001]
_comatime = random 300
#LOOP
~1
_comatime = _comatime - 1
?(_comatime <= 0): goto "END"
?!(alive _unit): goto "END"
goto "BLACKOUT"
#END
titlecut ["","black in",1]
exit
you could have the unit run some animations forcing the unit to lay down etc