Files

1.9 KiB

IScriptNpc.setNpcSpeed

← IScriptNpc · ← Master

Parça 4/7 · önceki · sonraki

boolean isInvincible()

Checks if the NPC is invincible.

c.getSubject().isInvincible();

setCanSwim

void setCanSwim(boolean canSwim)

Sets whether the NPC can swim.

c.getSubject().setCanSwim(true);

canSwim

boolean canSwim()

Checks if the NPC can swim.

c.getSubject().canSwim();

setImmovable

void setImmovable(boolean immovable)

Sets whether the NPC is immovable.

c.getSubject().setImmovable(true);

isImmovable

boolean isImmovable()

Checks if the NPC is immovable.

c.getSubject().isImmovable();

setShadowSize

void setShadowSize(float size)

Sets the shadow size of the NPC.

c.getSubject().setShadowSize(0.8);

Parameters: size - the new shadow size for the NPC.

getShadowSize

float getShadowSize()

Gets the shadow size of the NPC.

var size = c.getSubject().getShadowSize();

Returns: the shadow size of the NPC.

setXpValue

float setXpValue(int xp)

Sets the XP value of the NPC.

c.getSubject().setXpValue(10);

Parameters: xp - the new XP value for the NPC.

Returns: the new XP value.

getXpValue

int getXpValue()

Gets the XP value of the NPC.

var xp = c.getSubject().getXpValue();

Returns: the XP value of the NPC.

getPathDistance

float getPathDistance()

Gets the path distance of the NPC. Also determines the NPC's sight radius of "look at player" option.

var distance = c.getSubject().getPathDistance();

Returns: the path distance of the NPC.

setPathDistance

void setPathDistance(float sightRadius)

Sets the path distance of the NPC. Also determines the NPC's sight radius of "look at player" option.

c.getSubject().setPathDistance(10);

Parameters: sightRadius - the new path distance for the NPC.

setAttackRange