actions-and-utilities

Applies Phaser 4 batch actions and utility functions to arrays of game objects.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill actions-and-utilities-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: actions-and-utilities
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/actions-and-utilities
Command: npx skills add https://github.com/autonomous-ai/openharness --skill actions-and-utilities-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Positioning, styling, and transforming dozens of game objects one by one in Phaser 4 is repetitive and error-prone. This Skill provides the complete Phaser.Actions namespace plus Array, Object, and String utilities so batch operations on game objects are done in single calls. ## Core Features & Use Cases - Batch Property Operations: Set or increment x, y, alpha, scale, rotation, tint, depth, and more across entire arrays of game objects with optional per-item step values. - Geometry-Based Placement: Arrange objects on circles, ellipses, lines, rectangles, and triangles, or scatter them randomly within geometric bounds. - Grid Layout and Distribution: Use GridAlign for grid layouts and Spread/SmoothStep for interpolating property values across item sets. - Utility Functions: Array manipulation (shuffle, sort, range generation), object config parsing (GetValue, GetFastValue), and string helpers (Format, UUID). - Use Case: Spawn 20 enemy sprites, arrange them in a 5x4 grid with GridAlign, fade their alpha from 0 to 1 with Spread, and wrap them in screen bounds with WrapInRectangle. ## Quick Start Arrange my group of enemy sprites into a 5x4 grid starting at position 100,100 and fade their alpha values from 0.3 to 1 across the group.

Frequently Asked Questions about actions-and-utilities

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I arrange Phaser sprites in a grid layout?

Use Phaser.Actions.GridAlign with a config object specifying width, height, cellWidth, cellHeight, and starting x/y position. Pass an array of game objects, such as the result of group.getChildren(), and each item is positioned into the grid cells.

How do I set a property on all objects in a Phaser group?

Call a Phaser.Actions function like SetX, SetAlpha, or SetScale with group.getChildren() as the first argument. Actions operate on plain arrays, not Group objects directly, and return the same array for chaining.

Can I use Phaser Actions with Game Object shapes like circles?

Placement actions like PlaceOnCircle and RandomRectangle require Phaser.Geom objects, not Game Object shapes. If you have a Phaser.GameObjects.Circle, pass its .geom property to the action instead.

What is the difference between GetValue and GetFastValue in Phaser?

GetValue supports dot-path lookups like 'render.screen.width' with fallback defaults, while GetFastValue only checks top-level keys. Use GetFastValue in hot loops since it skips dot-path parsing and runs faster.

Why does Phaser Spread place a single item at the midpoint?

Spread distributes a property linearly from min to max across all items, so with only one item it lands at (min + max) / 2 rather than at min. This is expected interpolation behavior, not a bug.

Does Phaser Actions Shuffle modify the original array?

Yes, both Phaser.Actions.Shuffle and Phaser.Utils.Array.Shuffle perform a Fisher-Yates shuffle in place and return the same array. The original ordering is not preserved, so copy the array first if you need it.