Scripting boss fight

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Scripting boss fight

Post 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.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Scripting boss fight

Post 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.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply