Files

1.9 KiB

IScriptNpc.setNpcSpeed

← IScriptNpc · ← Master

Parça 5/7 · önceki · sonraki

void setAttackRange(float sightDistance)

Sets the attack range of the NPC.

c.getSubject().setAttackRange(5);

Parameters: sightDistance - the new attack range for the NPC.

getAttackRange

float getAttackRange()

Gets the attack range of the NPC.

var range = c.getSubject().getAttackRange();

Returns: the attack range of the NPC.

setKillable

void setKillable(boolean killable)

Sets the killable status of the NPC. If false, then NPCs can be killed only by a command. Regardless of the state, killable allows to make this NPC damaged until 0 health.

c.getSubject().setKillable(true);

Parameters: killable - the new killable status for the NPC.

isKillable

boolean isKillable()

Gets the killable status of the NPC. If false, then NPCs can be killed only by a command. Regardless of the state, killable allows to make this NPC damaged until 0 health.

var isKillable = c.getSubject().isKillable();

Returns: true if the NPC is killable, false otherwise.

canGetBurned

boolean canGetBurned()

Gets the burnable status of the NPC.

var canGetBurned = c.getSubject().canGetBurned();

Returns: true if the NPC can get burned, false otherwise.

canGetBurned

void canGetBurned(boolean canGetBurned)

Sets the burnable status of the NPC.

c.getSubject().canGetBurned(true);

Parameters: canGetBurned - the new burnable status for the NPC.

canFallDamage

boolean canFallDamage()

Gets the status if the NPC can take fall damage.

var canFallDamage = c.getSubject().canFallDamage();

Returns: true if the NPC can take fall damage, false otherwise.

canFallDamage

void canFallDamage(boolean canFallDamage)

Sets the status if the NPC can take fall damage.