OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 31 Jan 2005, 11:18:43
-
Hi guys.
I want to make a script that activates when player named friend is dead.
I want it to randomly pick from lets say 5 different sidechat messages coming from my unit called hq when he dies.
-
use an eventhandler friend addeventhandler ["killed",{[_this exec "somescript.sqs"}]
then in the script;
_friend = _this select 0
_messages = ["JOHNNNYYY!!!!","DAMN ALPHA IS DOWN","JOHNNY IS HIT"]
_ran = random (count _messages)
_ran = _ran - (_ran mod 1)
player sidechat format ["%1",_messages select _ran]
not guarenteed as i havet got OFP in front of me
-
thx ill try it out