Skip to contents

Play a single movement without changing the current mood. Use this helper or a plain gesture name in update_mascot().

Usage

mascot_gesture(name)

Arguments

name

A required non-empty gesture id: a lowercase letter followed by lowercase letters, digits or underscores. "nod" acknowledges an action; "wave" greets (characters without arms rock instead). See mascot_gestures() for descriptions. There is no default; NULL is not accepted.

Value

A mascot_gesture object. Its fields are internal; pass it on rather than reading them.

Details

A character or mood change in the same call applies first, then the gesture. During a character swap the gesture is skipped: the wave within the swap replaces it. Reduced motion skips the movement. A gesture sent before the mascot appears is kept until it appears; only the latest early gesture plays, once, after the queued character and mood are applied.

This helper checks only the form of the id. update_mascot() checks whether the chosen character declares that gesture. If it does not, the warning lists that character's available gestures and leaves the mascot unchanged.

Examples

mascot_gesture("nod")
#> mascot_gesture("nod")
mascot_gesture("wave")
#> mascot_gesture("wave")