CanEntityBeHostile
Usage
- Return a bool value to override default behavior
Example Autogenerated
csharp
private bool? CanEntityBeHostile( BaseCombatEntity instance )
{
Puts( "CanEntityBeHostile works!" );
return null;
}csharp
private bool? CanEntityBeHostile( BasePlayer instance )
{
Puts( "CanEntityBeHostile works!" );
return null;
}Location
- BaseCombatEntity::IsHostile()
- BasePlayer::IsHostile()
csharp
public virtual bool IsHostile()
{
object obj = Interface.CallHook("CanEntityBeHostile", this);
if (obj is bool)
{
return (bool)obj;
}
return unHostileTime > Time.realtimeSinceStartup;
//---csharp
public override bool IsHostile()
{
object obj = Interface.CallHook("CanEntityBeHostile", this);
if (obj is bool)
{
return (bool)obj;
}
return State.unHostileTimestamp > TimeEx.currentTimestamp;
//---