Class TMissileCreatureResource
Unit
CastleCreatures
Declaration
type TMissileCreatureResource = class(TCreatureResource)
Description
Creature that blindly moves in a given direction. It just moves into the given direction (with some possible twists, e.g. it can be a "homing" missile and/or be dragged down by gravity). On collision, it hits, potentially hurting the alive 3D object that was colliding (player or other creatures).
Missiles ignore TCreatureResource.Flying, they use their own way to handle gravity with DirectionFallSpeed.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
nested const DefaultMoveSpeed = 10.0; |
|
|
 |
nested const DefaultCloseDirectionToTargetSpeed = 0.0; |
|
|
 |
nested const DefaultPauseBetweenSoundIdle = 2.0; |
|
|
 |
nested const DefaultHitsPlayer = true; |
|
|
 |
nested const DefaultHitsCreatures = false; |
|
|
 |
nested const DefaultDirectionFallSpeed = 0.0; |
|
|
 |
nested const DefaultRemoveDead = true; |
|
|
Methods
 |
function RadiusCalculate(const GravityUp: TVector3): Single; override; |
|
|
 |
constructor Create(const AName: string); override; |
|
|
Properties
 |
property DieAnimation: T3DResourceAnimation read FDieAnimation; |
|
Die (destroying) animation of a missile. Optional. It can depict missile explosion. After showing this animation (or immediately when missile hits something, if this animation is not specified) the missile is removed from the level (unless RemoveDead = False).
|
 |
property MoveSpeed: Single read FMoveSpeed write FMoveSpeed
default DefaultMoveSpeed; |
|
The moving speed: how much Direction vector will be scaled when moving.
|
 |
property SoundHit: TSoundType
read FSoundHit write FSoundHit; |
|
Sound when missile hits anything. None (stNone) by default.
|
 |
property CloseDirectionToTargetSpeed: Single
read FCloseDirectionToTargetSpeed
write FCloseDirectionToTargetSpeed
default DefaultCloseDirectionToTargetSpeed; |
|
For "homing" missiles, how fast direction to the target is corrected. Zero (default) means that the missile is not "homing".
|
 |
property SoundIdle: TSoundType
read FSoundIdle write FSoundIdle; |
|
Sound played continuously when the missile is going. None (stNone) by default.
See also
- PauseBetweenSoundIdle
- This should be synchonized with length of SoundIdle sound.
|
 |
property PauseBetweenSoundIdle: Single
read FPauseBetweenSoundIdle write FPauseBetweenSoundIdle
default DefaultPauseBetweenSoundIdle; |
|
This should be synchonized with length of SoundIdle sound.
|
 |
property HitsPlayer: boolean
read FHitsPlayer write FHitsPlayer default DefaultHitsPlayer; |
|
|
 |
property HitsCreatures: boolean
read FHitsCreatures write FHitsCreatures default DefaultHitsCreatures; |
|
|
 |
property RemoveDead: boolean
read FRemoveDead write FRemoveDead default DefaultRemoveDead; |
|
Should the dead (destroyed) missiles be removed from level. Useful if you want to see arrows stuck into walls where they hit.
This is like TWalkAttackCreatureResource.RemoveDead and TStillCreatureResource.RemoveDead, except for missiles the default is True. Also, even if you switch this to False, it's ignored (works like True) if the missile hit a dynamic object (like another creature or player). It only works when a missile hit something else than a creature/player, which means that it probably hit a static level wall.
|
Generated by PasDoc 0.16.0.