Fire arrows

By LadylexUK

From the series of tutorials based around Tomb Raider. In this tutorial we will create arrows which can be ordinary or on fire, and will inflict different damage to enemies. They will also catch items on fire.

Step One
Create your arrow. Choose one of the arrows from the gallery. I used the Archers Arrow. In its brain add:

WHEN [global][boolvar: fire arrow] DO [play fx][fx:candle flame][at socket][head]

Make a copy of the arrow. Make one a template. Place a bow in your world. Lay the non-templated arrow across the bow and attach it. Make the bow a template. This will give you a visual indication that fire arrows have been selected.

Step two

Create a brain in a logic cube and save it. I am going to call it ON FIRE.

  1. WHEN [page entered] DO [colorvar: original primary color][equals][primary color]
  2. …WHEN DO [colorvar:original tertiary color][equals][tertiary color]
  3. …WHEN DO [colorvar:original secondary color][equals][secondarycolor]
  4. …WHEN DO [colorvar:original solid color][equals][solid color]
  5. WHEN DO [play fx][fx:Flame aura] // this puts it all over the character not just his feet]
  6. WHEN [duration timer][10]
  7. …WHEN [countdown timer][2][in frames][loop][trigger on start]DO [toggle][boolvar:color]
  8. …WHEN [boolvar:col] DO[solid color][equals][red]
  9. …/…WHEN [else] DO [solid color][equals][orange]
  10. WHEN [countdown timer][3.3][loop]
  11. …WHEN DO [damage][10][without hit reaction]
  12. …WHEN DO [play fx][fx:fireball impact]
  13. WHEN [countdown timer][11]
  14. …WHEN DO [play sound][sound: Fire Metal sizzle]
  15. …WHEN DO [primary color][equals[colorvar:original primary color]
  16. …WHEN DO [tertiary color][equals][colorvar:original tertiary color]
  17. …WHEN DO [secondary color][equals][colorvar:original secondary color]
  18. …WHEN DO [solid color][equals][colorvar:original solid color]
  19. …WHEN DO [remove brain][this brain]

Step Three

In player brain add:

WHEN [once] DO [equip][IWP:bow]
WHEN [D pad][up direction][pressed] DO [toggle][global][boolvar:fire arrow]
WHEN [global][boolvar:firearrow]
…WHEN [attack hit][ranged] DO
…/…WHEN [started to][not][has brain][ON FIRE] DO [it][add brain][ON FIRE]

Selected flammable objects

Now if you want selected objects that are inflammable then add a variable to the object brains.

In the object brain

WHEN [once] DO [boolvar:inflammable][equals true] //this is for when most objects are not flammable (you can invert this as needed)

In the player brain change to

WHEN [global][boolvar:firearrow]
…WHEN [attack hit][ranged]
…/…WHEN [it][boolvar:flammable] DO
…/…/…WHEN [started to][not][has brain][ON FIRE] DO [it][add brain][ON FIRE]



Comments are closed.

Website Powered by

Up ↑

%d bloggers like this: