• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua script TFS 1.2

gohamvsgoku

Member
Joined
Aug 21, 2017
Messages
151
Reaction score
9
How can i do effect on corpse position of creature after death?

"water elemental" when die, i need effect number 3 on corpse.
 
in "creaturescripts.xml" add:
Lua:
<event type="death" name="death_animation" script="death_animation.lua"/>

in \data\creaturescripts create file "death_animation.lua" that contains:

Lua:
function onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    
    creature:getPosition():sendMagicEffect(3)
    
    return true
end

Add the event to the Water Elemental xml file:

XML:
<script>
    <event name="death_animation"/>
</script>
 
Back
Top