ScarDoc

Start typing to search the SCAR reference.

Function
Util

Util_CreateEntities

Creates a given number of entities at a location and adds them to an egroup. A PlayerID of nil will create the entities as world objects.

On this page
Util_CreateEntities(player, egroup, blueprintID, location, numentities, toward, snapToGround, skipForceConstruct, useMarkerTransform)

Description

The skipForceConstruct parameter allows you to skip the step that normally spawns buildings fully constructed, so you can spawn buildings that self-construct. The toward parameter should be a world location that the entity should look at, NOT a direction. Leave it blank if you want the location's orientation to be used for a direction (assuming location is a marker). The useMarkerTransform parameter, if no toward is passed in, will determine if the marker's transform should be used for the entity OR if the marker's direction should be used in which case the entity will face the same way as the marker.

Parameters

  • playerPlayerIDrequired
  • egroupEGroupIDrequired
  • blueprintIDIntegerrequired
  • locationMarkerID/Posrequired
  • numentitiesIntegerrequired
  • towardMarkerID/Posoptional
  • snapToGroundBooleanoptional
  • skipForceConstructBooleanoptional
  • useMarkerTransformBooleanoptional

Returns

EGroup

Source

Declared in the game's script sources at:

scar/scarutil.scar