getId
getId: (Projectile) -> numberThe spot animation (SpotanimID).
| Method | Returns | Description |
|---|---|---|
getId() | number | The spot animation (SpotanimID). |
getSourceLevel() | number | The plane it starts on. |
getSourcePoint() | WorldPoint | The world tile it starts at. |
getTargetLevel() | number | The plane it ends on. |
getTargetPoint() | WorldPoint | The world tile it ends at. |
getTarget() | LocalPoint? | The centre of its target tile as a local point of the top level (LocalPoint.fromWorld(topLevel, getTargetPoint())), nil when the tile i… |
getTargetActor() | Actor? | The actor it is aimed at, looked up in the top-level world view, or nil when it is aimed at a tile (or the actor is gone). |
getInteracting() | Actor? | The same as getTargetActor(). |
getSourceActor() | Actor? | The actor it was fired from, looked up in the top-level world view, or nil (fired from a tile, or the actor is gone). |
getStartCycle() | number | The client cycle it starts moving at. |
getEndCycle() | number | The client cycle it reaches its target (and despawns) at. |
getRemainingCycles() | number | Client cycles until it reaches its target: getEndCycle() minus the client's cycle now. |
getX() | number | Its local x now. |
getY() | number | Its local y now. |
getZ() | number | Its height now. |
getOrientation() | number | Its yaw (JAU, 0..2047). |
getStartHeight() | number | How far above the ground at its source it starts, in the units of Perspective.getTileHeight: it starts at the tile height there minus thi… |
getEndHeight() | number | How far above the ground at its target it ends, in the units of Perspective.getTileHeight: it ends at the tile height there minus this. |
getAnimation() | Animation? | The animation it plays (its spot animation's), nil when it plays none. |
getAnimationFrame() | number | The frame of its animation it is on; -1 when it plays none. |
getSlope() | number? | How steeply it arcs: the angle it leaves at, larger for a higher arc. nil for a projectile sent without one (the class's note). |
getStartPos() | number? | How far from its source, along the line to its target, it starts (128 to a tile). nil for a projectile sent without one (the class's note… |
| Method | Returns | Description |
|---|---|---|
Client.getProjectiles | {Projectile} | Every projectile in flight. |
ProjectileMoved.getProjectile | Projectile | The projectile. |
getIdgetId: (Projectile) -> numberThe spot animation (SpotanimID).
getSourceLevelgetSourceLevel: (Projectile) -> numberThe plane it starts on.
getSourcePointgetSourcePoint: (Projectile) -> WorldPointThe world tile it starts at.
getTargetLevelgetTargetLevel: (Projectile) -> numberThe plane it ends on.
getTargetPointgetTargetPoint: (Projectile) -> WorldPointThe world tile it ends at.
getTargetgetTarget: (Projectile) -> LocalPoint?The centre of its target tile as a local point of the top level (LocalPoint.fromWorld(topLevel, getTargetPoint())), nil when the tile is outside the scene. It does not follow an aimed-at actor.
getTargetActorgetTargetActor: (Projectile) -> Actor?The actor it is aimed at, looked up in the top-level world view, or nil when it is aimed at a tile (or the actor is gone).
getInteractinggetInteracting: (Projectile) -> Actor?The same as getTargetActor().
getSourceActorgetSourceActor: (Projectile) -> Actor?The actor it was fired from, looked up in the top-level world view, or nil (fired from a tile, or the actor is gone).
getStartCyclegetStartCycle: (Projectile) -> numberThe client cycle it starts moving at.
getEndCyclegetEndCycle: (Projectile) -> numberThe client cycle it reaches its target (and despawns) at.
getRemainingCyclesgetRemainingCycles: (Projectile) -> numberClient cycles until it reaches its target: getEndCycle() minus the client's cycle now.
getXgetX: (Projectile) -> numberIts local x now.
getYgetY: (Projectile) -> numberIts local y now.
getZgetZ: (Projectile) -> numberIts height now.
getOrientationgetOrientation: (Projectile) -> numberIts yaw (JAU, 0..2047).
getStartHeightgetStartHeight: (Projectile) -> numberHow far above the ground at its source it starts, in the units of Perspective.getTileHeight: it starts at the tile height there minus this.
getEndHeightgetEndHeight: (Projectile) -> numberHow far above the ground at its target it ends, in the units of Perspective.getTileHeight: it ends at the tile height there minus this.
getAnimationgetAnimation: (Projectile) -> Animation?The animation it plays (its spot animation's), nil when it plays none.
getAnimationFramegetAnimationFrame: (Projectile) -> numberThe frame of its animation it is on; -1 when it plays none.
getSlopegetSlope: (Projectile) -> number?How steeply it arcs: the angle it leaves at, larger for a higher arc. nil for a projectile sent without one (the class's note).
getStartPosgetStartPos: (Projectile) -> number?How far from its source, along the line to its target, it starts (128 to a tile). nil for a projectile sent without one (the class's note).