ReferenceScripting APIMotionSceneafter
MotionScene.after
methodRuns a function once, after some seconds.
| Name | after |
|---|---|
| Kind | method of MotionScene |
| Called as | scene.after(…) |
| As a node | On Seconds Passed (logic graph) |
| Since | 0.3 |
Syntax
after( seconds: number, fn: () => void): numberParameters
| Name | Type | Description |
|---|---|---|
seconds | number | How long to wait |
fn | () => void | The function to run |
Returns
number: an id, for scene.cancel.
Example
scene.after(5, () => scene.hide("Hello"));See also
In examples: Rain Harbour, Vent Garden
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.