OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: haroon1992 on 23 Jul 2009, 15:05:16
-
I have a small question if its not to much trouble,
I am making a death match mission with ambient life in it, cows chickens etc, all works fine at the moment, but i would like the players to be punished with -1 point if they kill an animal, have you any idea how I would do it?
I have seen the addrating command, but am unsure how to us it. I am a noob when it comes to this.
Thanks
-
Place a trigger anywhere on the map. Leave it as 'None' and 'Present'. Put in the condition field:
not (alive chicken)
Where chicken can be the name of any of your animals.
In the On activation field put this:
aP addrating -1
Where aP is the name of your player
You can also use a getdammage command where if your soldier shoots an animal, HQ will tell you to stop it...
In the condition field put this:
getdammage chicken > 0
and in the On activation field put:
[West,"hq"] sidechat "Stop shooting the animals"
Hope this helps :)
Gruntage
-
No i mean how do i define who shot the animals so that i can reduce marks from the one who shot the animals(as there are players in the MP)
-
In that case, use the hint format command:
_u = _this select 0
_rat = (rating _u) +1
hint format ["%1 stop killing the animals!", name _u]
_u addrating -_rat
this would be the script used in the following eventhandler:
_animal = _this select 0
_animal addeventhandler ["Killed", {_this exec "animalkilled.sqs"}]
I think thats right :scratch:
You can also use sidechat format instead of hint:
_u = _this select 0
[West,"hq"] sidechat format ["%1 stop killing the animals!" name _u]
Hope this helps
Gruntage
-
I believe this should go into the ArmA 2 section.