Skip to main content

Pixi Puppet

Plays a rigged 2D character package (.xgc.json) in a Pixi scene: clips, look-at, sliders and clip events, driven directly or by the slot round.

The Pixi Puppet plays a Living Character inside a Pixi Stage or Pixi Container.

The node loads a character package (assets/characters/<name>/character.xgc.json and its atlas pictures) and plays it. It works in two modes:

  • Direct: it plays the clip named in Clip.
  • Round events: from the first round signal on, the character's own moments pick the clips, under the market's rules. See In Your Game.

It is found under Game Engine in the node picker; search puppet or character. It must sit inside a Pixi scene; it takes no children.

Inputs​

Puppet​

DataDescription
Package URLThe character file, for example assets/characters/lucky/character.xgc.json. A folder also works (character.xgc.json is added). Changing it reloads; empty removes the character
SeedSeeds the random parts of the procedural motion (blink timing, variation) and the idle extras. Default 1
Edge ModeAs Rigged, Alpha or SDF. SDF edges are for parts shown strongly magnified
SignalDescription
ReloadRead the package again from disk, after it was re-saved outside the Studio

Animation​

Used in direct mode only. Ignored once round events drive the character.

DataDescription
ClipThe clip to play. Default idle. Empty stops it
LoopAs Clip, Loop or Once
Fade (s)Crossfade time between clips. Default 0.2. In round-event mode it overrides the character's own blend only if you set it
SpeedTime multiplier, 0 freezes. Also scales the round-event timing
SignalDescription
Play(Re)play Clip
StopStop

Look At​

DataDescription
Look AtTurn the head towards Look X, Look Y
Look XTarget point, in the same space as X / Y
Look YTarget point, in the same space as X / Y

Parameters​

DataDescription
Param NameA slider name, for example Smile (see the Params output)
Param ValueThe value to hold it at
SignalDescription
Set ParamHold the slider at Param Value over the clips. Kept across reloads
Release ParamHand the slider back to the clips

Behaviour​

DataDescription
MarketDefault, UK or GLI-19. The rules applied to round events. Changing it starts again from rest
StateA moment name for Trigger State: spin_start, win_small, win_big, win_mega, anticipation, bonus_enter, bonus_exit, tap_react, idle, no_celebration
SignalDescription
Trigger StatePlay the moment named in State, under the same rules

Round Events​

Values are read at the moment a signal fires.

DataDescription
StakeThe round's paid stake
WinThe round's win, in the same unit as Stake
TierOptional: none, small, big or mega, overriding the default tiers (big ≥ 10×, mega ≥ 50×)
FeatureThe feature's name, for example free_spins
Feature ConfirmedThe server's result already holds the feature. Anticipation plays only then
SignalDescription
Round StartA spin starts (reads Stake)
Round ResultThe server's result is in (reads Win, Stake, Feature, Feature Confirmed, Tier)
Round SettledThe round is over
Feature EnterA feature starts (reads Feature)
Feature ExitIt ends (reads Feature, Win as the feature total)
TapA tap with no part: the Tapped moment

Riding​

DataDescription
NameThis character's name, for others to ride on
Ride OnThe Name of the character to ride
Ride BoneThe carrier's bone to ride. X, Y and Rotation become an offset from it
Turn With BoneRotate with the bone. Default on
Share MomentsGet the carrier's round events (not its taps)
Share SlidersComma-separated slider names to copy from the carrier every frame

Position and transform​

DataDescription
XHorizontal position
YVertical position
Rotation (rad)Rotation in radians
Scale XHorizontal scale; -1 mirrors
Scale YVertical scale
Height (px)Fit the rest pose to this height. 0 = the source size, often 1500 px or more

Appearance​

DataDescription
AlphaTransparency
VisibleVisibility. A hidden character is not drawn, but its clips keep time
Z-IndexDrawing order among siblings

Outputs​

Events​

SignalDescription
ReadyA character finished loading
EventA clip event fired
Clip FinishedA clip that does not loop ended
TappedThe player tapped the character (only characters with tap zones)
DataDescription
Event IDThe event's id, for example cheer
Event Typesfx, fx, shake or custom
Finished ClipThe clip that finished
Tapped PartThe part that was tapped

Status​

DataDescription
Is ReadyThe character is loaded
LoadingIt is loading
ErrorWhy it could not load or play — see Troubleshooting

Info​

DataDescription
ClipsThe clip names the character has
ParamsThe slider names the character has

Behaviour​

DataDescription
StateThe moment it is in
BlockedWhat the last event or call was refused for, or empty

General​

DataDescription
Node ReferenceThe node, for scripts: getPuppet() returns the live character and getBehaviour() the round-event behaviour (null until used)

See also​

Was this page helpful?