We've got a spell that spawns a short puff of cloud on the tile immediately in front of a player, and we want that cloud to put any monster it hits to sleep on impact. The code we tried using (inserted at the end of the cloud object's TileDamager component) looks like this:
Code: Select all
onHitMonster:function(self, monster)
monster:setCondition("sleep",10)
monster:showDamageText("test")
end,
If we replace the word "sleep" with "burning", "frozen", "poisoned", or "stunned", it sets the condition correctly, but when we hit a monster with the sleep version, nothing happens. The monster takes the damage from the TileDamager, and the word "test" appears over the monster, but there's no sleeping, and there's no error message indicating why not. Can anybody help?