Hi, I have this script that if you kill a monster it spawns another one (if you made something wrong) but I want it to spawn at the same spot, but as it reacts exactly whe nthe mosnter dies it still counts as there is a monster there, so I'd like a timer of like 1 second that starts when the monster dies and after that second the new monster spawns.
I give you some code if it would make the help easier:
at the "here" to "to here" is where I'd like the timer
thanks in advance
I give you some code if it would make the help easier:
Code:
if(isMonster(target) == TRUE) then
if getCreatureName(target) == config.monstername then
local monsterpos = getCreaturePosition(target)
if monsterpos.x == 5123 and monsterpos.y == 4933 and monsterpos.z == 15 then
if getGlobalStorageValue(1000) == 1 then
setGlobalStorageValue(1000, 2)
else
setGlobalStorageValue(1000, -1)
---------------------HEEEERE--------------------------
local monsterpos = {x=5123, y=4933, z=15, stackpos= STACKPOS_TOP_CREATURE}
local getmonster = getThingfromPos(monsterpos)
if getmonster.itemid > 0 then
else
doCreateMonster('NAME', {x=5123, y=4933, z=15})
end
--------------------- TO HEEEERE-----------------------
end
end
end
end
at the "here" to "to here" is where I'd like the timer
thanks in advance