monsters using custom spells
Posted: Mon Oct 29, 2012 11:56 pm
Hello all,
I got a monster that uses magic ranged attack to use a custom spell along with its standard magic attack
onRangedAttack = function(self)
if self.facing == 0 then
spawn("armagedon", self.level, self.x, self.y-1, self.facing)
end
if self.facing == 1 then
spawn("armagedon", self.level, self.x+1, self.y, self.facing)
end
if self.facing == 2 then
spawn("armagedon", self.level, self.x, self.y+1, self.facing)
end
if self.facing == 3 then
spawn("armagedon", self.level, self.x-1, self.y, self.facing)
end
just replace armagedon with the name in the defineObject for your custom spell
This is what the Lord of Chaos in my game will be using by the way muahhahahahahahhaah. ouch
Better have healing pots ready and find all of the tomes of health.
LG
I got a monster that uses magic ranged attack to use a custom spell along with its standard magic attack
onRangedAttack = function(self)
if self.facing == 0 then
spawn("armagedon", self.level, self.x, self.y-1, self.facing)
end
if self.facing == 1 then
spawn("armagedon", self.level, self.x+1, self.y, self.facing)
end
if self.facing == 2 then
spawn("armagedon", self.level, self.x, self.y+1, self.facing)
end
if self.facing == 3 then
spawn("armagedon", self.level, self.x-1, self.y, self.facing)
end
just replace armagedon with the name in the defineObject for your custom spell
This is what the Lord of Chaos in my game will be using by the way muahhahahahahahhaah. ouch
Better have healing pots ready and find all of the tomes of health.
LG