Skip to content

Sprite API

Xeltica edited this page Jun 21, 2018 · 7 revisions

You can specify <sprite_tag> as a first parameter in all Sprite API.

You can control the player entity if you specify player as a parameter of sprite_tag.

e.g.

+spset boy, "entity.npc.boy.stay", 0, 0

// These are same each other.
boy+spofs 40, 0
+spofs boy, 40, 0

References

+spset <sprite_tag>, <char_id>[, <x>, <y>]

Create a sprite with sprite_tag. You specify a sprite animation which is registered to the manager. You can also specify x and y to set a default position.

+spsetf <sprite_tag>, <char_id>[, <x>, <y>]

Create a sprite without the gravity.

<sprite_tag>+spofs <x>, <y>

Change a position of the sprite.

<sprite_tag>+spchr <char_id>

Change a character of the sprite.

<sprite_tag>+spevent <label>

Set a label of the event to execute for the sprite.

<sprite_tag>+spwalk <distance>, <time>

Let the sprite walk. Unit of the time parameter is second. If the sprite supports walking motion, it will navigate to the walking animation.

<sprite_tag>+spclr

Delete the sprite.

Clone this wiki locally