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
 |
internal const DefaultMoveSpeed = 10.0; |
|
 |
internal const DefaultCloseDirectionToTargetSpeed = 0.0; |
|
 |
internal const DefaultPauseBetweenSoundIdle = 2.0; |
|
 |
internal const DefaultHitsPlayer = true; |
|
 |
internal const DefaultHitsCreatures = false; |
|
 |
internal const DefaultDirectionFallSpeed = 0.0; |
|
 |
internal const DefaultRemoveDead = true; |
|
Methods
 |
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 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 default stNone; |
Sound just played when the missile is going.
|
 |
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 DirectionFallSpeed: Single
read FDirectionFallSpeed write FDirectionFallSpeed
default DefaultDirectionFallSpeed; |
How fast is the missile pulled down by gravity. Non-zero value causes missile direction to gradually point downward, this way missile flies downward eventually.
This is quite different (in different units and with slightly different effect) than T3D.FallSpeed, hence a different name and property. TMissileCreatureResource doesn't use T3D.Gravity and so ignores T3DResource.FallSpeed, T3DResource.GrowSpeed and other properties.
0 means to not fall down (missile is not affected by gravity).
|
 |
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.12.1 on 2013-02-04 20:26:50
|