Page 1 of 1

Scripting boss fight

Posted: Wed Mar 18, 2015 1:32 am
by Emera Nova
I'm attempting to make it so during my one boss fight the bosses attacks increase in speed over the course of the fight due to certain lvls of health.

Code: Select all

function CheckHealth()

   if bedivere_skeleton_commander_1.monster:getHealth() <= 500
 then

   bedivere_skeleton_commander_1.monster:setCooldown(1)

   end

end
Thats what I have in place at the moment, and it broke once it got to that part of the fight. So I'm not sure what would be needed changed to have its attack cooldown go from 3 to 1.

Re: Scripting boss fight

Posted: Wed Mar 18, 2015 1:35 am
by minmay
MonsterComponent has no method named "setCooldown". See the scripting reference. You probably wanted to call that method on one of the object's MonsterActionComponents instead.