-
Notifications
You must be signed in to change notification settings - Fork 1
AnimatedFlag
Grisgram edited this page May 12, 2022
·
3 revisions
Attention! Do not simply set the sprite_index
to another value at runtime!
There are some calculations involved, when the sprite shall change, therefore a function exists in the object:
assign_sprite = function(new_sprite_index, new_image_index = 0)
Just call this function instead of a direct assignment to sprite_index
and you're fine!
myFlagObject.assign_sprite(newsprite);
The AnimatedFlag
object offers a group of instance variables that define the running animation of the flag.
Variable | Description |
---|---|
animation_fps |
how many frames shall be calculated? |
intensity |
how many waves are on the flag |
wave_speed |
how fast do the waves move |
wave_height |
how strong are the waves |
vertex_count |
if -1, then default of 10% of sprite width |
render_width |
if -1, then image_xscale as set in room editor |
render_height |
if -1, then image_yscale as set in room editor |