src/field/script_commands_carry.c
Carry: two hands lift the target, move it with the d-pad and drop it, or crash together when cast at nothing. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | CARRY_SHARDS 20 | The sparkles Carry throws out as it drops its target. |
Functions
| Name | Description | |
|---|---|---|
void | fdEffectSpawnFallingParticles (void) | Event while Carry holds its target: drops one particle a tick round the lifted actor, 8 to 24 pixels above it and 0 to 48 pixels away in a random direction (fdEffectInitFallingFragment). |
void | fdEffectSpawnRadialParticleRing (ACTOR *actor) | Spawns 17 particles that spread from origin in a flat ring, their x velocity 1.5 times their z velocity, so the ring is wider than deep as the field is drawn. |
static __inline__ Sint32 | fdActorProbeRaised (ACTOR *actor, VECTOR3 *pos) | The collision at position for the actor standing 16 pixels higher. |
void | fdPsynergySteerLiftedTarget (Sint32 targetId) | When Carry is cast on a target, two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is. |
void | fdPsynergyCarry (void) | Carry cast with no target: two hands appear 32 pixels to either side of the spot, close 24 pixels in and meet with a crash that scatters ITEM_BREAK_SHARD_MAX sparkles, then vanish. |
ACTOR * | fdEffectSpawnCarryHand (Sint32 x, Sint32 y, Sint32 z, Sint32 angle) | Spawns a hand (SPRITE_MOVE_HAND) with the item break sound and grows it, spinning 1/8 turn a tick, from a quarter to full size over 24 ticks; angle is the way it faces once grown. |
Description
Carry: two hands lift the target, move it with the d-pad and drop it, or
crash together when cast at nothing. Part of script_commands.c.
Macros in detail
CARRY_SHARDS
#define CARRY_SHARDS 20
The sparkles Carry throws out as it drops its target.
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 5 of file script_commands_carry.c.
Functions in detail
fdEffectSpawnFallingParticles
void fdEffectSpawnFallingParticles(void)
Event while Carry holds its target: drops one particle a tick round the
lifted actor, 8 to 24 pixels above it and 0 to 48 pixels away in a random
direction (fdEffectInitFallingFragment).
References fdActorSpawn(), fdEffectInitFallingFragment(), syRandom() and syVectorAddPolarOffset().
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 10 of file script_commands_carry.c.
fdActorProbeRaised
static __inline__ Sint32 fdActorProbeRaised(ACTOR *actor, VECTOR3 *pos)
The collision at position for the actor standing 16 pixels higher.
References fdMapGridCheckCollisionStub() and Sint32.
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 33 of file script_commands_carry.c.
fdPsynergySteerLiftedTarget
void fdPsynergySteerLiftedTarget(Sint32 targetId)
When Carry is cast on a target, two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is.
References fdActorCycleSpriteColors(), fdActorProbeRaised(), fdActorReleaseStub(), fdActorScriptCheckOverlapStub(), fdActorSelectAnimationStub(), fdActorSetSpriteColorModeStub(), fdActorSetSpriteFlagsStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), fdActorWaitForMoveStub(), fdEffectSpawnCarryHand(), fdEffectSpawnFallingParticles(), fdEffectSpawnRadialParticleRing(), fdInputGetDpadAngle(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), FieldEffectFragmentScript, FieldEffectSourceHoldScript, PerWork, Sint32, syCloseEvent(), syRandom(), sySetEvent(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset() and TickCount.
Referenced by fdPsynergyDispatch().
Definition at line 46 of file script_commands_carry.c.
fdPsynergyCarry
void fdPsynergyCarry(void)
Carry cast with no target: two hands appear 32 pixels to either side of the
spot, close 24 pixels in and meet with a crash that scatters
ITEM_BREAK_SHARD_MAX sparkles, then vanish.
References fdActorReleaseStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), fdActorWaitForMoveStub(), fdEffectSpawnCarryHand(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), FieldEffectFragmentScript, Sint32, syRandom(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyRun().
Definition at line 249 of file script_commands_carry.c.
fdEffectSpawnCarryHand
ACTOR *fdEffectSpawnCarryHand(Sint32 x, Sint32 y, Sint32 z, Sint32 angle)
Spawns a hand (SPRITE_MOVE_HAND) with the item break sound and grows it,
spinning 1/8 turn a tick, from a quarter to full size over 24 ticks; angle is
the way it faces once grown.
References fdActorSelectAnimationStub(), fdActorSpawn(), Sint32, sySoundPlayStub() and sySynch().
Referenced by fdPsynergyCarry() and fdPsynergySteerLiftedTarget().
Definition at line 302 of file script_commands_carry.c.