So I'm learning a bit of scripting and using the "Number guess game" from the modding tutorial, which I can't seem to find again..Anyway, I got it to work fine and messed with it a bit so that I understand how it works, and I looked up the script references to find a way to damage the party if the wrong number is guessed. I found the damageTile function and decided to try it. It damages my party, but there is no indication of being damaged, other than the red splats on the health-bars, and it doesn't matter which damageType I choose, it's always the same.
Code: Select all
counter = 0
function awesomeGame()
counter = counter + 1
local randomNumber = math.random(5)
if randomNumber == 3 then
print ("CORRECT!", counter, "TRIES!")
else
print ("FAIL DUDE!")
damageTile(1, 16, 14, 0, 0, "fire", 5)
end
end
The script works and there are no errors, there's just no indication of what damages you, no sound, no particles etc.
Also, I'm a bit confused with the flags, like "bit 0" and what they would be used for, but I guess that's irrelevant for this issue.
Thanks in advance.