Module SpawnStatic

Functional -- Spawn dynamically new Statics in your missions.

Banner Image


Demo Missions

SPAWNSTATIC Demo Missions source code

SPAWNSTATIC Demo Missions, only for beta testers

ALL Demo Missions pack of the last release


YouTube Channel

SPAWNSTATIC YouTube Channel


API CHANGE HISTORY

The underlying change log documents the API changes. Please read this carefully. The following notation is used:

  • Added parts are expressed in bold type face.
  • Removed parts are expressed in italic type face.

Hereby the change log:


AUTHORS and CONTRIBUTIONS

Contributions:

Authors:

  • FlightControl: Design & Programming

Global(s)

SPAWNSTATIC

SPAWNSTATIC class, extends Base#BASE

The SPAWNSTATIC class allows to spawn dynamically new Statics.

Type SPAWNSTATIC

SPAWNSTATIC.CountryID
SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)

Creates the main object to spawn a Static defined in the ME.

SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)

Creates the main object to spawn a Static based on a type name.

SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)

Creates a new Static from a POINT_VEC2.

SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)

Creates a new Static from a Zone.

SPAWNSTATIC.SpawnIndex
SPAWNSTATIC.SpawnTemplatePrefix
SPAWNSTATIC.SpawnTypeName

Global(s)

#SPAWNSTATIC SPAWNSTATIC

SPAWNSTATIC class, extends Base#BASE

The SPAWNSTATIC class allows to spawn dynamically new Statics.

There are two modes how SPAWNSTATIC can spawn:

  • Through creating a copy of an existing Template Static as defined in the Mission Editor (ME).
  • Through the provision of the type name of the Static.

Spawned Statics get the same name as the name of the Template Static, or gets the given name when a Static Type is used.
Newly spawned Statics will get the following naming structure at run-time:

  • Spawned Statics will have the name _StaticName#nnn_, where StaticName is the name of the Template Static, and nnn is a counter from 0 to 99999.

SPAWNSTATIC construction methods

Create a new SPAWNSTATIC object with the SPAWNSTATIC.NewFromStatic() or the SPAWNSTATIC.NewFromType() methods:

  • SPAWNSTATIC.NewFromStatic(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
  • SPAWNSTATIC.NewFromType(): Creates a new SPAWNSTATIC object given a type name and a name to be given when spawned.

SPAWNSTATIC Spawn methods

Groups can be spawned at different times and methods:

Type SpawnStatic

Type SPAWNSTATIC

Field(s)

SPAWNSTATIC.CountryID
SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)

Creates the main object to spawn a Static defined in the ME.

Parameters

  • #string SpawnTemplatePrefix : is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.

  • CountryID :

Return value

#SPAWNSTATIC:

SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)

Creates the main object to spawn a Static based on a type name.

Parameters

  • #string SpawnTypeName : is the name of the type.

  • SpawnShapeName :

  • SpawnCategory :

  • CountryID :

Return value

#SPAWNSTATIC:

SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)

Creates a new Static from a POINT_VEC2.

Parameters

  • Core.Point#POINT_VEC2 PointVec2 : The 2D coordinate where to spawn the static.

  • #number Heading : The heading of the static, which is a number in degrees from 0 to 360.

  • #string ( : ptional) The name of the new static.

  • NewName :

Return value

#SPAWNSTATIC:

SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)

Creates a new Static from a Zone.

Parameters

  • Core.Zone#ZONE_BASE Zone : The Zone where to spawn the static.

  • #number Heading : The heading of the static, which is a number in degrees from 0 to 360.

  • #string ( : ptional) The name of the new static.

  • NewName :

Return value

#SPAWNSTATIC:

#number SPAWNSTATIC.SpawnIndex
SPAWNSTATIC.SpawnTemplatePrefix
SPAWNSTATIC.SpawnTypeName

Type SPAWNSTATIC.SpawnZoneTable