Page 1 of 1

Umm, A little help would be appreciated

Posted: Fri Sep 14, 2012 10:25 pm
by Anacondas1
Hello, sorry to bother - but I am really new to scripting things, and am having a bit of trouble this to work:

cloneObject{
name = "Matrov",
baseObject = "snail",
movesound = "slime_walk",
attackPower = 50,
health = 360,
immunities = "poison",
onAttack = function(self)
spawn ("poison_cloud", self.level, self.x, self.y, self.facing)
onDie = function(self)
hudPrint("Matrov, the Putrid Prince has be Defeated!")
end,
}

I have probably done some really obvious thing wrong, but I just can't see it myself.
If you can help, it would be greatly appreciated :D
Thanks
Stephen

Re: Umm, A little help would be appreciated

Posted: Fri Sep 14, 2012 10:28 pm
by Shroom
Anacondas1 wrote:Hello, sorry to bother - but I am really new to scripting things, and am having a bit of trouble this to work:

cloneObject{
name = "Matrov",
baseObject = "snail",
movesound = "slime_walk",
attackPower = 50,
health = 360,
immunities = "poison",
onAttack = function(self)
spawn ("poison_cloud", self.level, self.x, self.y, self.facing)
onDie = function(self)
hudPrint("Matrov, the Putrid Prince has be Defeated!")
end,
}

I have probably done some really obvious thing wrong, but I just can't see it myself.
If you can help, it would be greatly appreciated :D
Thanks
Stephen
missing an end

cloneObject{
name = "Matrov",
baseObject = "snail",
movesound = "slime_walk",
attackPower = 50,
health = 360,
immunities = "poison",
onAttack = function(self)
spawn ("poison_cloud", self.level, self.x, self.y, self.facing)
end,
onDie = function(self)
hudPrint("Matrov, the Putrid Prince has be Defeated!")
end,
}

havent tested it, but thats what it looks like to me.

Re: Umm, A little help would be appreciated

Posted: Fri Sep 14, 2012 10:30 pm
by Anacondas1
Yep that worked, Thought it was something blindingly obvious :P

Thank you very much