Death animation: Dig a grave

By LadylexUK

Description: At death the creature will die, fall to the ground and a grave will grow out of the land with a tombstone at the creatures head end. After 6 seconds the grave and tombstone will disappear. Add this brain kode to any character you want to have this death animation. (Note: This has been optimised for the goblin death sequence, for other creatures you may need to alter the timing or sizes)

  1. WHEN [once] DO [destroy after death][equals][false]
  2. WHEN [started to][is dead] DO [boolvar:dying][equals][true]
  3. WHEN [boolvar:dying]
  4. …WHEN [swimming] DO [destroy] // this prevents the grave being made in the water (which does not look good)
  5. …WHEN [countdown timer][2]
  6. …/…WHEN DO [add terrain][duration][6][box][size][0.9][material slot 8] // whatever material slot is appropriate for your grave; the duration is the length of time the grave is in your world before it disappears
  7. …/…./…WHEN [once] DO [objvar:tombstone][equals][create][Tombstone B][at position][head][position][toward][left foot position]
  8. …/…/…/….WHEN DO [objvar:tombstone][position][y][equals][position][y][plus][0.8]
  9. …/…/…/…WHEN DO [play creation effect][objvar:tombstone]

In your tombstone brain

  1. …WHEN [countdown timer][6] DO [destroy] // I couldnt put this in the goblin brain because it was already destroyed

Now in the world I created the water level was such that the goblin was pushed into the ground into the water when the grave is built and line 4 destroyed the goblin. If this is not the case in your world add [destroy] as a child line to line 5 or line 10.

In my level I had a variation on this with a bugler playing “The Last Post”. For this make a kinect emote of the bugler playing and a countdown timer in the bugler to destroy him when the emote is finished.

WHEN DO [emote][bugling]
WHEN [countdown timer][12] DO [destroy]

Attach your bugler to the side of the tombstone you create and it will be created with the tombstone. Remember to change the duration of the graveĀ  and the destruction of the tombstone to fit your bugling emote length.

Comments are closed.

Website Powered by

Up ↑

%d bloggers like this: