Skip to content

Spawn Projection

Spawn Projection

Spawns a projection from the database at a specified actor's position.

Properties

System

Name Explanation Type
Origin The actor whose position is used as the origin for the spawned projection. Actor Reference
Projection The projection to spawn from the database, specified by index. Variable or Value
Result The variable to store the spawned projection's unique ID in. Variable or Value
Store ID When enabled, the unique ID of the spawned projection is stored in a variable. Toggle

Examples

Spawn a Projection at a Party Member

Spawns projection 0 at the position of party member 0.

spawn_projection(0, party(0));
{"Data":{"ProjectionID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":false,"IsPartyMember":true,"IsEntity":false,"IsUniqueID":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"StoreID":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Projection.ProjectionSpawnProjectionCommand"}

Spawn a Projection and Store Its Unique ID

Spawns projection 1 at the position of party member 0 and stores the resulting unique ID in global variable 0.

$gv[0] = spawn_projection(1, party(0));
{"Data":{"ProjectionID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":false,"IsPartyMember":true,"IsEntity":false,"IsUniqueID":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"StoreID":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Projection.ProjectionSpawnProjectionCommand"}

Spawn a Projection at the Current Entity

Spawns projection 2 at the position of the current entity (self).

spawn_projection(2, self);
{"Data":{"ProjectionID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"2","VariableIndex":0,"Metadata":null},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":true,"IsPartyMember":false,"IsEntity":false,"IsUniqueID":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"StoreID":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Projection.ProjectionSpawnProjectionCommand"}