OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ace Productions on 07 Oct 2003, 09:03:22
-
I want to increase the dammage caused by a flak 88 and I though of using the event handler "hit" to achieve this.
From what I read, EH "hit" returns the unit shot (victim), the unit that fired the shot (shooter) and the dammage caused (scalar). The victim in my case will be a Tiger I tank and the shooter will be the Flak 88. What I want to achieve is every time a Tiger is hit by a flak 88, 0.3 to be added to the already existing dammage.
Can someone please help me to write the script? ::)
-
Try this as a hit EH on a Tiger tank:
requiredVersion "1.91"
private ["_victim","_shooter","_damage","_currDmg","_newDmg"]
?(count _this != 3): exit
_victim = _this select 0
_shooter = _this select 1
_damage = _this select 2
?!(typeof _shooter == "88"):exit
_currDmg = damage _victim
_newDmg = _currDmg + 0.3
_victim setDamage _newDmg
-
Killswitch a million thanks and it's working perfectly!!! ;D
I hope u have as much cheese as u wish!!!