1 Upload Image
Character Sheet
Square 3×3 sheet recommended · click/drop
Weapon Image
Optional · click/drop
2 Preview
3 Usage
Setup: import the sheet PNG as a sprite with a single frame → create a script asset and paste the downloaded scr_zuo_motion.gml contents. Then, in your character object's 3 events:
// ① Create — register the character once (weapon is optional)
zuo_motion_create("hero", spr_mysheet, spr_sword);
// "hero" = any name you pick for this character
// spr_mysheet = the imported 3x3 sheet sprite
// spr_sword = weapon image (origin = center). Optional
// ② Step — switch motions whenever you want
if (keyboard_check_pressed(vk_space)) zuo_motion_change("hero", "attack1");
if (hspeed != 0) zuo_motion_change("hero", "walk");
zuo_motion_change("hero", "run", 1.5); // 3rd argument = playback speed for that motion (1.5x)
// ③ Draw — draw the animation
zuo_motion_draw("hero", x, y, 1, image_xscale, image_yscale, image_alpha, c_white);
x, y— where to draw. This point is the character's feet (ground), so in a platformer just pass the instance'sx, yas-is.1(4th arg) — animation speed.1=normal,2=2x,0.5=half. (multiplied by the per-motion speed)image_xscale / image_yscale— size.1=original,2=2x. A negativexscalefaces right (left by default).image_alpha— opacity 0–1.1=opaque,0.5=half-transparent.c_white— color tint.c_white=none. Hit-flash example:merge_colour(c_white, c_red, 0.5)- Weapon — pass a sprite (origin = center) as create's 3rd argument and it's always held in the right hand, swinging behind the arm normally and in front during attacks. Adjust the hand-to-weapon gap with the web's Hand/Weapon slider (=
ZUO_WPN_HANDLEN). - Spacing — dial in the values in the preview, then click ⧉ to copy a
zuo_motion_setgaps(id, …)call to your clipboard. Paste it into the game's Create/Step event to apply that character's spacing. (Global defaults can also be edited via theZUO_*macros at the top of the script.)