Skip to Content
The Alchemy Project

src/field/actor_scripts.c

The actor scripts the field's commands start: walking off and turning to face a set way, the dust puffs, the emote bubble's pop and the movement types fdActorSetMovementType starts by number; and, among them, the glyphs a message types before its speaker's first voice blip.

Variables

NameDescription
const Sint32ActorLaunchScript []An actor sent off from where the leader stands: it walks to where it was sent, stands, and turns to face the way it was given.
const Sint32DustPuffLongScript []A ledge jump's dust puffs (fdEffectSpawnDustPuff): one with its second animation lives about 40 ticks, one with its first about 20.
const Sint32DustPuffShortScript []The other dust puff: the same, looped 18 times.
const Sint32ActorStepAngleScript []Turns the actor until it faces the way it was given.
const Uint8MessageSpeedVoiceRates []The glyphs a message types before its speaker's first voice blip, by message speed option (fdMessageSetVoiceFromActor): the same as the gaps between blips, MessageSpeedVoiceGaps.
const Sint32EmoteBubbleScript []The emote bubble's pop: it appears squashed to half its width and a quarter taller, springs back in smaller swings every 2 ticks until it is square, stays 30 ticks and is released.
const Sint32ActorWaitScript []Shows for 40 ticks, then frees the actor.
const Sint32MovementTypeWanderScript []Movement type 2, a townsperson strolling about: walks 4 to 12 pixels at a time within 16 of where it stands, stopping 20 ticks between walks and 60 after every third.
const Sint32MovementTypeStandScript []Movement type 1: stands where it is.
const Sint32MovementTypeResetActionScript []Movement type 7: takes away the actor's shadow and collision, then stands.
const Sint32MovementTypeWanderNearScript []Movement type 3: as MovementTypeWanderScript, in steps of 2 to 4 pixels within 8.
const Sint32MovementTypeWanderCloseScript []Movement type 4: paces a little slower, pausing only 4 ticks between steps of 2 to 4 pixels, within 6 of where it stands.
const Sint32MovementTypeFollowWatchedScript []Movement type 5: follows the watched actor.
const Sint32MovementTypeFaceLeaderScript []Movement type 6: keeps turning toward the leader, whom fdActorSetMovementType makes it watch.
const Sint32ActorFaceWatchedScript []Keeps turning to face the watched actor, once a tick.

Description

The actor scripts the field's commands start: walking off and turning to face a set way, the dust puffs, the emote bubble's pop and the movement types fdActorSetMovementType starts by number; and, among them, the glyphs a message types before its speaker's first voice blip.

Variables in detail

ActorLaunchScript

const Sint32 ActorLaunchScript[]

An actor sent off from where the leader stands: it walks to where it was sent, stands, and turns to face the way it was given.

References fdActorStepAngle() and Sint32.

Referenced by fdActorLaunchFromLeader().

Definition at line 15 of file actor_scripts.c.

DustPuffLongScript

const Sint32 DustPuffLongScript[]

A ledge jump's dust puffs (fdEffectSpawnDustPuff): one with its second animation lives about 40 ticks, one with its first about 20.

References Sint32.

Referenced by fdEffectSpawnDustPuff().

Definition at line 26 of file actor_scripts.c.

DustPuffShortScript

const Sint32 DustPuffShortScript[]

The other dust puff: the same, looped 18 times.

References Sint32.

Referenced by fdEffectSpawnDustPuff().

Definition at line 32 of file actor_scripts.c.

ActorStepAngleScript

const Sint32 ActorStepAngleScript[]

Turns the actor until it faces the way it was given.

References fdActorStepAngle() and Sint32.

Referenced by fdActorFaceDirectionById() and fdTalkToActor().

Definition at line 39 of file actor_scripts.c.

MessageSpeedVoiceRates

const Uint8 MessageSpeedVoiceRates[]

The glyphs a message types before its speaker's first voice blip, by message speed option (fdMessageSetVoiceFromActor): the same as the gaps between blips, MessageSpeedVoiceGaps.

Referenced by fdMessageSetVoiceFromActor().

Definition at line 47 of file actor_scripts.c.

EmoteBubbleScript

const Sint32 EmoteBubbleScript[]

The emote bubble's pop: it appears squashed to half its width and a quarter taller, springs back in smaller swings every 2 ticks until it is square, stays 30 ticks and is released.

References Sint32.

Referenced by fdActorShowEmoteById().

Definition at line 56 of file actor_scripts.c.

ActorWaitScript

const Sint32 ActorWaitScript[]

Shows for 40 ticks, then frees the actor.

References Sint32.

Referenced by fdEffectSetAttached().

Definition at line 86 of file actor_scripts.c.

MovementTypeWanderScript

const Sint32 MovementTypeWanderScript[]

Movement type 2, a townsperson strolling about: walks 4 to 12 pixels at a time within 16 of where it stands, stopping 20 ticks between walks and 60 after every third.

References Sint32.

Referenced by fdActorSetMovementType().

Definition at line 94 of file actor_scripts.c.

MovementTypeStandScript

const Sint32 MovementTypeStandScript[]

Movement type 1: stands where it is.

References Sint32.

Referenced by fdActorSetMovementType().

Definition at line 119 of file actor_scripts.c.

MovementTypeResetActionScript

const Sint32 MovementTypeResetActionScript[]

Movement type 7: takes away the actor's shadow and collision, then stands.

References fdActorClearSpriteAndCollisionFlags() and Sint32.

Referenced by fdActorSetMovementType().

Definition at line 122 of file actor_scripts.c.

MovementTypeWanderNearScript

const Sint32 MovementTypeWanderNearScript[]

Movement type 3: as MovementTypeWanderScript, in steps of 2 to 4 pixels within 8.

References Sint32.

Referenced by fdActorSetMovementType().

Definition at line 129 of file actor_scripts.c.

MovementTypeWanderCloseScript

const Sint32 MovementTypeWanderCloseScript[]

Movement type 4: paces a little slower, pausing only 4 ticks between steps of 2 to 4 pixels, within 6 of where it stands.

References Sint32.

Referenced by fdActorSetMovementType().

Definition at line 155 of file actor_scripts.c.

MovementTypeFollowWatchedScript

const Sint32 MovementTypeFollowWatchedScript[]

Movement type 5: follows the watched actor.

References fdActorMoveTowardTarget() and Sint32.

Referenced by fdActorSetMovementType().

Definition at line 167 of file actor_scripts.c.

MovementTypeFaceLeaderScript

const Sint32 MovementTypeFaceLeaderScript[]

Movement type 6: keeps turning toward the leader, whom fdActorSetMovementType makes it watch.

References fdActorTurnTowardWatchedActor() and Sint32.

Referenced by fdActorSetMovementType().

Definition at line 174 of file actor_scripts.c.

ActorFaceWatchedScript

const Sint32 ActorFaceWatchedScript[]

Keeps turning to face the watched actor, once a tick.

References Sint32.

Referenced by fdActorWatchAndSetScript() and fdTalkToActor().

Definition at line 180 of file actor_scripts.c.