Description ​
Invoked when a turret changes a players status to hostile
Arguments ​
Turret
- The TurretPlayer
- The hostile player
Example ​
msc
using Console;
using Event;
using Peripheral;
// Registers an event listener for when a turret registers a hostile player.
// Hostile players are NOT KOS!
// Making a player hostile means the turret will track them when they are close,
// and prioritize hostile players for shooting at.
function OnTurretHostile(Turret trt, Player ply){
Console.WriteLine(ply.GetName().." is now friendly to the turret.");
}
Event.AddListener("TurretHostile", "turret_hostile", "OnTurretHostile");