Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

startCast

startCast(step, caster, ability, startCastOptions?): Refusal | undefined

Starts ability on caster, a character no player controls, from a game’s own system, as the cast command does for a player’s: checks that the caster holds it, stands and is not casting, that its cooldowns ran out, that it can pay the cost, and that a projectile’s or a chain’s target is one it may strike, in range and in sight. Then it holds the cost back, turns the caster to face the target, ends its walk on a rooted cast, and releases an instant cast at once. Returns the refusal, or undefined once the cast started. A refusal emits no CastRefusedEvent, since a game’s loop asks each step, and a target out of range is refused, never waited on: the game walks its caster closer and asks again. Call it from a system ordered before: [abilities.systems.cast], as the cast is before the projectiles, so a bolt it releases flies in the same step. Throws for an ability the world has not installed. As Unreal’s TryActivateAbility, which answers whether it activated.

Parameter Type
step AuthoritativeStep
caster Entity
ability AbilityName
startCastOptions StartCastOptions

Refusal | undefined