Type: Assembly brain
Level: not in gallery
Description: This is a game mechanic brain that controls the Arena encounter. After the player enters the arena, the doors close and two goblins are created. Once the player kills the goblins the exit door of the arena opens and he can leave.
- WHEN [once][in trigger zone][player] DO [IWP:entrance][power off] // this closes the entry door
- …WHEN DO [power on]
- …WHEN [for each of][objset:Enemy create points] DO [objset:enemies][increment by][create][goblin bruiser][at position][it][toward][me] // this creates a goblin at every position that has been added to the enemy create points set (a logic cube: see brain below)
- …/…WHEN DO [play fx][fx:poof][on][it]
- WHEN [has power]
- …WHEN [objset:enemies][count][equal to] // when there are no more goblins
- …/…WHEN DO [IWP:Exit][power on] // open the door
- …/….WHEN [duration timer] DO [look at target][IWP:exit]
Logic cube brains (spawning points)
WHEN [page entered] DO [IWP:Arena Master][objset:enemy create points][increment by][me]
Adding more goblins
Simply copy and paste one of the spawn position logic cubes.
Changing to another enemy
Change line 3 to another enemy. You can use the once in the character gallery, assembly gallery, or templated character using IWP.
Having a boss appear instead of the door opening
Place a spawning point for your boss in the form of a logic cube
7. …/…WHEN [started to] DO[objvar:boss][equals] [create][yeti][at position][IWP:boss spawn][position]
8. …/…WHEN [not][objvar:boss]
9…/…/…WHEN DO [IWP:Exit][power on] // open the door
10…./…/…WHEN [duration timer] DO [look at target][IWP:exit]