Code: Select all
onDie = diecounter:decrement()
Code: Select all
onDie = function()
diecounter:decrement
print("you got 'em")
end
Code: Select all
onDie = diecounter:decrement()
Code: Select all
onDie = function()
diecounter:decrement
print("you got 'em")
end
Code: Select all
onDie = function()
return sicksnail.diecounter()
print("you got 'em")
end
Code: Select all
function diecounter()
diecounter:decrement
end
Had a similar problem a while back, a script with a counter:decrement() command in would not for love or money decrement the counter. Perhaps the problem is related, and the decrement() command is broken for scripts(ie only works from connecters) ???Komag wrote:I tried cloning a snail into a "sick_snail", and I added the linebut that doesn't work, so I tried:Code: Select all
onDie = diecounter:decrement()
but that doesn't work either. both ways give an error and won't load the dungeonCode: Select all
onDie = function() diecounter:decrement print("you got 'em") end
my guess would be your onDie = function() line instead of onDie = function(monster)Komag wrote:I tried cloning a snail into a "sick_snail", and I added the linebut that doesn't work, so I tried:Code: Select all
onDie = diecounter:decrement()
but that doesn't work either. both ways give an error and won't load the dungeonCode: Select all
onDie = function() diecounter:decrement print("you got 'em") end
Code: Select all
cloneObject{
model = "mod_assets/models/monsters/snail_ben.fbx",
name = "sick_snail",
baseObject = "snail",
health = 2,
sight = 1,
attackPower = 1,
onDie = function(monster)
return sickscript.snaildie()
end
}
Code: Select all
function snaildie()
diecounter:decrement()
print("you got 'em")
end