Type: Assembly Brain
Level: not in gallery
Pages: 1
Description: Found in the Laser Cannon Advanced Assembly. This cannon will track and send out a laser toward an enemy, will power up then shoot the enemy dead.
Kode
- WHEN [once] DO [team][equals][team 1]
- …WHEN DO [boolvar:done firing][equals][true]
- …WHEN DO [#pause attack][equals][3]
- …WHEN DO [#cannon range][equals][15]
- WHEN [team][equal to][neutral] DO [team][equals][team][1]
- WHEN [distance to][objvar:my enemy][greater than][#cannon range] DO [objvar:my enemy][equals][nothing]
- …WHEN DO [boolvar:enemy in range][equals][false]
- …WHEN [else] DO [boolvar:enemy in range][equals][true]
- WHEN [objvar:my enemy][equal to][nothing]
- …WHEN [enemies][objects closer than][#cannon range] DO [objvar:my enemy][equals][it]
- …WHEN [duration timer][0.3] DO [pitch][8][toward][position][plus][iwp:Laser Cannon Mount][forward]
- …WHEN DO [boolvar:firing][equals][false]
- …WHEN DO [boolvar:done firing][equals][true]
- …WHEN DO [objvar:charge effect][power off]
- …WHEN [else]
- …/…WHEN DO [draw line][red][from][fire point][position][to][my enemy]
- …/…WHEN [countdown timer][0.25] DO [pitch][toward][objvar:my enemy][center][slowly]
- …/…WHEN DO [iwp:Laser Cannon Mount][turn][toward][objvar:my enemy][center][angle][10]
- …/…WHEN [boolvar:done firing]
- …/…/…WHEN [boolvar:enemy in range]
- …/…/…/…WHEN [countdown timer][pause attack][loop]
- …/…/…/…/…WHEN [started to] DO [boolvar:firing][equals][true]
- …/…/…/…/…/…WHEN DO [#pause attack][equals][random number][2.5][to][3.5]
- WHEN [boolvar:firing]
- …WHEN [duration timer][1.5] DO [play fx][fx:Laser Cannon Charge][at socket][fire point]
- …WHEN [countdown timer][1.5]
- …/…WHEN [started to]
- …/…/…WHEN DO [shoot][in direction][forward][with damage][shoot damage][at speed][30][launch frequency][30][disallow friendly fire][unblockable]
- …/…/…WHEN DO [play fx][fx: Muzzle Flash – Laser Cannon][at socket][fire point][scale][1.5]
- …/…/…WHEN DO [boolvar:done firing][equals][true]
- …/…/…WHEN DO [boolvar:firing][equals][false]