Sep 7, 2018
Reaction score
First Language
Primarily Uses
Yep me again lol

Ok so im trying to make a custome damage over time i can get it to do the base damage without an issue but then when tyring to get the casters magic damage taken into acount i cannot get it to save my life

<Custom Regenerate Effect>
var damage = 5 + (Math.floor(user.mat / 20));
</Custom Regenerate Effect>

that is what i have I've tried this so many different ways its not even funny I've tried using user. I've tried going with actor I've tried storing them into a var then combining them together for the damage nothing works!!

i just want it to deal a base damage of 5 then add an additional 1 damage for every 20 magic attack of the caster lol


Ok i finaly got it working lol....

<Custom Regenerate Effect> var user = origin; var elementId = 3; var elementRate = target.elementRate(elementId); var damage = Math.floor(user.mat / 10) + 10; damage = Math.floor(damage * elementRate); damage = Math.min(damage, 75); target.gainHp(-damage); </Custom Regenerate Effect>

"origin" finaly called the caster instead of the monster lol

anyone wondering the above code does this

Var user - Calls on the caster of the skills stats
var elementId = - stores the element id from the database
var elementRate = - selecting the target for the element ID
var damage = - sets the base damage to 5 then divides the casters mat by 20
1st damage = - combining the damage formula and elemental rate effect
2nd damage = - sets max damage that can be delt to 75
target.gainHp - then adds the damage to the monster

the regenerate effect does the damage every turn the state is on the monster

origin; was the only call that worked without setting to the monster when used in a state instead of the skill damage formula everything else always sat to the stats of the monster instead

alternatively you can use yanflys Extended DoT plugin to achieve this with only using the damage formula but if you don't have that this will work with just the buff and state core

you can also add animation to the effect just as the DOT plugin does simply by adding this after the target.gainHP


change the a to which ever you disire such as target or origin or leave it a and change the number to what ever animation you wish to play.
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

The site is being slow and funky again. IS SOMEONE CRAFTING POEMS?!
So yeah, @TRIDIUM @TESTOSTERONE, I wuz like, "What do they mean by borderline and boundaries?"

And then, y'all know this girl?



The clothes? They're just a, um, quick edit. :kaoswt:
I've uploaded the opening cutscene from my game to my channel. It basically introduces us to the first three characters, and what their relationships are:
Cosmic Inferno: Opening dialogue
I don't want to start a panic...but everyone, check the color of your milk!
My One Map Challenge is nearing completion. I am in the multiple run testing phase atm. This is the map. Beware the minotaurs in the maze area. The female ones are more aggressive. Can you prove to the land of Winchell that a dragon and a human can love each other?

Forum statistics

Latest member