mnscript
Device_TargetHit(TargetDevice, Player, string, string)
Description ​
Invoked when a connected Target is hit
Arguments ​
TargetDevice
- The TargetDevice which was hitPlayer
- The Player who hit the targetstring
- Damage inflictedstring
- Weapon used
Example ​
msc
using Console;
using Util;
using Event;
using Player;
using Device;
function OnTargetHit(TargetDevice target, Player player, string damage, string weapon){
Console.WriteLine(player.GetName().." hit target! with "..Util.ToString(weapon).." with "..Util.ToString(damage));
}
Event.AddListener("Device_TargetHit", "targets", "OnTargetHit");