Yo guys.
I'm new in lua but i have a question:
why this code not work?
If addEvent isn't exits and its just player:TeleportTo(rewardRoom) it work but no delay. How to delay this function?
I'm new in lua but i have a question:
Lua:
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified)
addEvent(teleport, 5000, player:getId(), rewardRoom)
rewardRoom:sendMagicEffect(CONST_ME_TELEPORT)
killer:unregisterEvent("bossroom death")
bossRoom.player = nil
bossRoom.boss = nil
return true
end
If addEvent isn't exits and its just player:TeleportTo(rewardRoom) it work but no delay. How to delay this function?