Damage Over Time and Delay Fuse by LadyLexUK

Have something important that other people might find usefull? Well, drop it here and help others!
User avatar
Level 3
Level 3
Posts: 184

Damage Over Time and Delay Fuse by LadyLexUK

Post#1 » Mon Aug 15, 2016 5:59 pm

moved over from projectspark.com forums

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.

An explosive barrel with a delay fuse

Kohldar posted in Dec 2013 that he wanted to create an explosive barrel that left a crater. I have adapted the Kode he used to create a barrel with a fuse and terrain damage.

Place a standard Explosive barrel.

Add a piece of rope as an attachment to the top of your explosive barrel.

Change brain of barrel to this:


WHEN [interacted] DO [boolvar:burning][=][true]
WHEN [boolvar:burning][=][true] DO
...WHEN DO [play fx][candle flame][on][IWP:Rope piece]
...WHEN [countdown timer][4] DO [kill][me] // this is the duration of your fuse

then the rest of the standard brain as child lines to the burning boolean, then

...WHEN DO [subtract terrain][cylinder][radius][5][height][1.5]

When the player interacts the rope will start to burn and then after 4 seconds the barrel explodes, damaging any enemies by 35 health points, and creates a crater.

For more drama (and if you have Epic Artist) change the color of the ground in the blast radius


...WHEN DO [paint terrain][radius][5][material slot 8] // I used asteroid coast
End of line.

Return to “Tutorials and guides”

Who is online

Users browsing this forum: No registered users and 1 guest