ComponentRef

Spawn Model

SpawnModel

Creates an instance of a model.

Properties

Model

A reference to the model that will be spawned.

Position

If not set to zero then this property is the position that the model will have when it has been spawned.

Scale

If not set to identity (1,1,1) then this property is the scale that the model will have when it has been spawned.

Rotate

If not set to zero then this property is the rotation that the model will have when it has been spawned.

SpawnStyle

Can be set to either 'Clone' or 'Reference'. If set to 'Clone' the model and all its children will be cloned for each instantiation. If set to 'Reference' it will spawn the actual model it refers to. A model spawned with 'Reference' can only be spawned once, then it has to be removed before it can be respawned.

UseSpawnerPosition

If this property is set then the spawned model will use the same position as the model that issues the SpawnModel-command. Useful when a model should emit other models, like a model firing missiles for instance. Note that if the Position-property also is set, then this value will be added to the current model to get the final position. This can be used to offset the spawn position (i.e. shots are emitted from the front of the ship).

SpawnerIsParent

Sets CurrentModel as 'Parent' to the spawned model. If a model has a parent then it will automatically be removed when its parent is removed.

Green Marinee theme adapted by David Gilbert, powered by PmWiki