Error Calling "onHitMonster"

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!
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Error Calling "onHitMonster"

Post by NutJob »

cameronC wrote:
o.item:addConnector("onEquipitem", "lib", "aaa")
lowercase "item"?
You'd think it was that, but I accidentally left it like that as one of my hundreds of iterations to make it work. =)

I had it as onEquipItem originally.
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Error Calling "onHitMonster"

Post by NutJob »

So should I submit the addConnector method with either onEquipItem or onUnequipItem produces an error?

Would anyone mind taking one, maybe two minutes, to confirm this doesn't or does work?
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Error Calling "onHitMonster"

Post by MrChoke »

The problem with the hook callback is you cannot name the function starting with "on". No idea why but I had the same problem. Rename the "onHitMonster" function to something like "hitMonsterFN". I bet it fixes the problem.
Post Reply