- Joined
- Nov 17, 2010
- Messages
- 6,811
- Solutions
- 582
- Reaction score
- 5,370
The Forgotten Server, version 0.3.7_SVN (Crying Damson)
I want to make a death animation for some creatures.
Easiest and most functional way seems to be to make the creature cast a spell at the time of death.
Can easily make the animation, and make it hit no damage.. or even make it hit damage!
But unsure how to do so.
I can use either..
Unsure how to define the position of the creatures death, and I don't know how to force cast a spell.
Looked around found some OnKill portals and such, but haven't found anything regarding casting a spell.
If using
Would this get the position of the creature casting the spell, or the person that dealt damage to the creature?
I believe it would get the position where the creature died, or 'is dying', so now I'm left with casting the spell, but no idea how to execute the spell.
Soo I'm here, anyone know how to force cast a spell?
Any help is appreciated.
Xikini
I want to make a death animation for some creatures.
Easiest and most functional way seems to be to make the creature cast a spell at the time of death.
Can easily make the animation, and make it hit no damage.. or even make it hit damage!
But unsure how to do so.
I can use either..
Code:
function onKill(cid, target, damage, flags)
Code:
function onDeath(cid, corpse, killer)
Looked around found some OnKill portals and such, but haven't found anything regarding casting a spell.
If using
Code:
local position = getCreaturePosition(cid)
I believe it would get the position where the creature died, or 'is dying', so now I'm left with casting the spell, but no idea how to execute the spell.
Soo I'm here, anyone know how to force cast a spell?
Code:
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
-- castSpell = "Butterflies&Rainbows"
return TRUE
end
Xikini