Files

1.9 KiB

IScriptNpc.setNpcSpeed

← IScriptNpc · ← Master

Parça 6/7 · önceki · sonraki

c.getSubject().canFallDamage(true);

Parameters: canFallDamage - the new status for the NPC's fall damage.

getDamage

float getDamage()

Gets the damage strength points of the NPC.

var damage = c.getSubject().getDamage();

Returns: the damage of the NPC.

setDamage

void setDamage(float damage)

Sets the damage strength points of the NPC.

c.getSubject().setDamage(10);

Parameters: damage - the new damage for the NPC.

getDamageDelay

int getDamageDelay()

Gets the damage delay of the NPC.

var delay = c.getSubject().getDamageDelay();

Returns: the damage delay of the NPC.

setDamageDelay

void setDamageDelay(int damageDelay)

Sets the damage delay of the NPC.

c.getSubject().setDamageDelay(5);

Parameters: damageDelay - the new damage delay for the NPC.

doesWander

boolean doesWander()

Gets the wandering status of the NPC.

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

Returns: true if the NPC wanders, false otherwise.

setWander

void setWander(boolean wander)

Sets the wandering status of the NPC.

c.getSubject().setWander(true);

Parameters: wander - the new wandering status for the NPC.

doesLookAround

boolean doesLookAround()

Gets the status of the NPC's idle look around behavior.

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

Returns: true if the NPC looks around while idle, false otherwise.

setLookAround

void setLookAround(boolean lookAround)

Sets the status of the NPC's idle look around behavior.

c.getSubject().setLookAround(true);

Parameters: lookAround - the new idle look around status for the NPC.

doesLookAtPlayer

boolean doesLookAtPlayer()

Gets the status of the NPC's behavior to look at the player.