SpawnSpot: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "==ACS function== ===Syntax=== ''int'' '''SpawnSpot'''(''str type'', ''int spottid'', ''int tid'', ''int angle'') ===Arguments=== *''type'': name of class of thing to spawn. S...")
 
Line 4: Line 4:


===Arguments===
===Arguments===
*''type'': name of class of thing to spawn. Supports both actual names as defined in [[EDF]], and '''compatname''' values, based on the names from [[Doom Wiki:ZDoom|ZDoom]].
*''type'': name of class of thing to spawn. Supports both actual names as defined in [[EDF]] [[thingtype|thingtypes]], and '''compatname''' values, based on the names from [[Doom Wiki:ZDoom|ZDoom]].
*''spottid'': [[TID]] of position things (usually map spots, but not required so) where to spawn things of class ''type''.
*''spottid'': [[TID]] of position things (usually map spots, but not required so) where to spawn things of class ''type''.
*''tid'': optional TID to give to the newly spawned things.
*''tid'': optional TID to give to the newly spawned things.

Revision as of 15:03, 1 April 2020

ACS function

Syntax

int SpawnSpot(str type, int spottid, int tid, int angle)

Arguments

  • type: name of class of thing to spawn. Supports both actual names as defined in EDF thingtypes, and compatname values, based on the names from ZDoom.
  • spottid: TID of position things (usually map spots, but not required so) where to spawn things of class type.
  • tid: optional TID to give to the newly spawned things.
  • angle: byte angle where the newly spawned things should look.

Return value

Returns the number of things successfully spawned.

Remarks

Spawns one or more things of class type at the map spot things tagged as spottid. It optionally tags them with tid if non-zero. They will all face in direction of angle.

Spawning will fail for any map spots blocked by other solid things. This function will only return the number of actual spawned objects. Also, no teleportation fog will be produced.

See also