Goblin Spawner

Type: Assembly Brain
Level: not in gallery
Pages: 1
Description: Found in the Goblin Spawner Assembly (Player Detector cube). When the player enters the trigger zone a single goblin is created at the position of a logic cube. See alterations for a continuous stream of goblins.

Kode

Player Detector logic cube

  1. WHEN [once][in trigger zone][player]
  2. …WHEN DO [play fx][fx:Poof][at position][iwp:Goblin Spawner]
  3. …WHEN DO [create][character:Goblin Scavenger][at position][iwp:Goblin SPawner][toward][iwp:Player Detector]

Alterations

Spawn multiple goblins

  1. WHEN [once][in trigger zone][player]
  2. …WHEN DO [play fx][fx:Poof][at position][iwp:Goblin Spawner]
  3. …WHEN [for each of][4] DO [create][character:Goblin Scavenger][at position][iwp:Goblin Spawner][toward][iwp:Player Detector] // choose a number. They will spawn on top of each other and then slide apart.

Spawn continuous goblins
Will spawn a goblin every 2 seconds while the player is in the trigger zone.

  1. WHEN [in trigger zone][player]
  2. …WHEN [countdown timer][2][loop][trigger on start]
  3. …/…WHEN [started to] DO [play fx][fx:Poof][at position][iwp:Goblin Spawner]
  4. …/…WHEN DO [create][character:Goblin Scavenger][at position][iwp:Goblin Spawner][toward][iwp:Player Detector]

Spawn a set amount of goblins 

  1. WHEN [in trigger zone][player]
  2. …WHEN [#goblins spawned][less than][4]
  3. …/…WHEN [countdown timer][2][loop][trigger on start]
  4. …/…/…WHEN [started to] DO [play fx][fx:Poof][at position][iwp:Goblin Spawner]
  5. …/…/…WHEN DO [create][character:Goblin Scavenger][at position][iwp:Goblin Spawner][toward][iwp:Player Detector]
  6. …/…/…WHEN [started to] DO [#goblins spawned][increment by][1]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: