Skip to main content

setAnimation

MahiruLess than 1 minute

setAnimation

Sets an animation.

Statement Content

Sets the custom animation name and drives the specified stage object target to perform a multi-segment animation.
See Custom Animations and Animation Reference for details.

Info

If you want to define a multi-segment animation directly in the script, use setTempAnimation.
If you only want to set a single-segment animation, use setTransform.

setAnimation:shake -target=aaa;

Parameters

target

  • String

The target of an animation.

Available targets:

  • fig-center: center figure
  • fig-left: left figure
  • fig-right: right figure
  • The id of a free figure
  • bg-main: background
  • stage-main: stage
changeFigure:1/open_eyes.png -id=aaa;
setAnimation:shake -target=aaa;

writeDefault

  • Boolean

When the value is true, all unassigned transform and effect properties are written with their default values.
When the value is false, unassigned properties inherit the existing values.

changeFigure:1/open_eyes.png -id=aaa;
setAnimation:shake -target=aaa -writeDefault;

keep

  • Boolean

Converts the animation into a cross-statement animation. The current animation keeps playing while subsequent statements run, until it ends or is interrupted by another setTransform, setAnimation, or setTempAnimation with the same target.
It is usually used together with the next parameter.

; Assume this is a very long animation
setAnimation:shake -target=aaa -keep -next;
CharacterA:First line;
CharacterA:Second line;
CharacterA:Third line;
; This interrupts aaa's cross-statement animation and plays a new animation
setAnimation:rotate -target=aaa -keep -next;