Follower – Ranged

Type: Allies brain
Level: 3 star
Pages: 1
Description: NPC Ally brain. This character is armed with a bow and will fire arrows at the enemy.

Kode

  1. WHEN [once] DO  [equip][Rangers Bow]
  2. …WHEN DO [team][equals][team 1]Determines that the player is an ally and offers help
  3. …WHEN [after][objects closer than][5][player][allies] DO [objvar:my leader][equals][it]
  4. …/…WHEN [duration timer][2] DO [say][text:Im here to help]
  5. WHEN [objvar:my leader][equal to][nothing]
  6. …WHEN [objects closer than][5][allies] DO [objvar:my leader][equals][it]
  7. WHEN [enemies][objects closer than][20]
  8. …WHEN DO [objvar:myenemy][equals][it]
  9. …WHEN [else] DO [move][toward][my leader][min distance][4]Attack kode
  10. WHEN [not][objvar:my enemy][is dead] DO
  11. …WHEN [countdown timer][pause attack][loop][trigger on start]
  12. …/…WHEN DO [turn][toward][objvar:my enemy]
  13. …/…WHEN DO [shoot][at][objvar:my enemy]
  14. …/…WHEN DO [numvar:pause attack][equals][random number][0.9][to][1.25]

Alterations

Combination of melee and ranged
Make him attack with fists at close range. This makes him less deadly, but perhaps more realistic as you are unlikely to fire arrows at close range. Slightly simpler version of the Follower Ranged and Melee brain.
Change from line 10.

  1. WHEN [not][objvar:my enemy][is dead] DO
  2. …WHEN [distance to][objvar:my enemy][greater than or equal to ][2]
  3. …/…WHEN [countdown timer][pause attack][loop][trigger on start]
  4. …/…/…WHEN DO [turn][toward][objvar:my enemy]
  5. …/…/…WHEN DO [shoot][at][objvar:my enemy]
  6. …/…/…/…WHEN DO [numvar:pause attack][equals][random number][0.9][to][1.25]
  7. …/…WHEN [else]
  8. …/…/…WHEN [counrdown timer][numvar:pause attack][loop] DO [attack][objvar:my enemy]
  9. …/…/…/…WHEN DO [numvar:pause attack][rquals][random number][0.5][to][2.5]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: