Fiery Sword with Damage over time

By LadylexUK (Feb 2015)
Copied from

Fiery Sword with damage over time

There was a discussion back in Dec 2013 about how to apply Damage over time from wounds inflicted with a fiery sword. A solution was put forward by Grimatoma which didn’t quite work when I tested it, but here is my adaptation of his Kode which does work.

When you hit an enemy with your fiery sword they will catch fire and their health will decrease over a time of your choosing.

Fiery sword

First make your fiery sword. I placed a fire effect as an attachment (centre socket) to a standard sword using Character Studio. Renamed as Fiery sword.

Player brain


WHEN [IWP:Fiery sword][equipped]
…WHEN [attack hit][enemies] DO
…/…WHEN DO [it][numvar:duration][=][7] // how long you want him to burn
…/…WHEN DO [it][numvar:damage][=][1] // how much damage the burn will inflict per second
…/…WHEN DO [it][boolvar:burning][=][true] // tells the enemy he is on fire

In all enemy brains


WHEN [boolvar:burning][=][true] DO
…WHEN [duration timer][numvar:duration] DO
…/…WHEN DO [play fx][Burning Aura][on][me]
…/…WHEN [countdown timer][loop] DO [damage][me][numvar:damage][without hit reaction]
…WHEN [countdown timer][numvar:duration] DO [boolvar:burning][=][false] // without this you cannot get a second damage loop

Here’s a little visual effect you may want to add.
as a child line to the duration timer
…/…WHEN [timer seconds remaining][equals][2] DO [solid color][=][black]

This will turn your enemy completely black as if burnt, 2 seconds before they stop burning the first time you hit them.


Comments are closed.

Website Powered by

Up ↑

%d bloggers like this: