Type: Assembly Brain
Level: not in gallery
Pages: 1
Description: Found in the Lightning Bolt assembly. When the player enters the trigger zone a lightning bolt will hit the ground with accompanying light and sound.
Kode
- WHEN [once][in trigger zone][player] DO [play fx][fx:Lightning bolt]
- …WHEN DO [play sound][sound:Weather Lightning Strike]
- WHEN [after][in trigger zone][player]
- …WHEN [after][countdown timer][0.3]
- …/…WHEN DO [power on]
- …/…WHEN[after countdown timer][0.3]
- …/…/…WHEN DO [power off]
Alterations
Continued strikes
This brain will only do a lightning bolt once. To have continual strikes if the player remains in the trigger zone change the brain like this:
- WHEN [in trigger zone][player] DO [boolvar:in range][equals][true]
- WHEN [no longer][in trigger zone][player] DO [boolvar:in range][equals][false]
- …WHEN DO [power off]
- WHEN [boolvar:in range]
- …WHEN [started to] DO [power on]
- …WHEN [started to][countdown timer][0.3] DO [power off]
- …WHEN [countdown timer][3][loop][trigger on start] DO [play fx][fx:Lightning bolt]
- …/…WHEN [started to] DO [power on]
- …/….WHEN DO [play sound][sound:Weather Lightning Strike]
- …WHEN [countdown timer][3.3][loop] DO [power off]
To make the strike a hazard
Add as a child line to line 4
WHEN [for each of][in trigger zone][player] DO [damage][it][20]
…WHEN DO [push][it][away from][me][strong]