Type: Allies brain
Level: 3 star
Pages: 1
Description: An ally NPC that will attack enemies with an axe.
Kode
- WHEN [once] DO [equip][Woodsmans Axe]
- …WHEN DO [team][equals][team 1]Determines that the player is an ally and offers help
- …WHEN [after][objects closer than][5][player][allies] DO [objvar:my leader][equals][it]
- …/…WHEN [duration timer][2] DO [say][text:Im here to help]
- WHEN [objvar:my leader][equal to][nothing]
- …WHEN [objects closer than][5][allies] DO [objvar:my leader][equals][it]
Attack kode
- WHEN [enemies][objects closer than][17]
- …WHEN DO [objvar:my enemy][equals][it]
- …WHEN [else] DO [move][toward][objvar:my leader][min distance][4]
- WHEN [not][objvar:my enemy][is dead] DO [move][toward][objvar:my enemy]
- …WHEN [distance to][objvar:my enemy][less than][2]
- …/…WHEN [countdown timer][numvar:pause attack][loop] DO [attack][objvar:my enemy][with windup][end combo]
- …/…/…WHEN DO [numvar:pause attack][equals][random number][0.5][to][2.5]
Alterations
Show health bar over head when attacked
Add
WHEN [health][changed] DO [boolvar:show health][equals][true]
WHEN [boolvar:show health] DO [display meter][blue][heath][above][small HUD]
…WHEN [countdown timer] DO [boolvar:show health][equals][false]