How to make a destructable object respawn?
Posted: Sat Jan 05, 2008 10:34 pm
I am trying to get an object to respawn with no success.
I have tried setting it to "destructablebuilding" and "powerupstation" with a RespawnTime, but it just isn't working.
Any ideas on how I can make the object destructable, then have it respawn in 30 seconds?
EDIT:
Azzameen said this would make it respawn instantly, but suggested I use a timer to delay it 30 seconds. How would I add the timer
I have tried setting it to "destructablebuilding" and "powerupstation" with a RespawnTime, but it just isn't working.
Any ideas on how I can make the object destructable, then have it respawn in 30 seconds?
EDIT:
Azzameen said this would make it respawn instantly, but suggested I use a timer to delay it 30 seconds. How would I add the timer
Code: Select all
OnObjectKillName(
function()
local ObjectMatrix = GetEntityMatrix("OBJECTNAME")
DeleteEntity("OBJECTNAME")
CreateEntity("odfname", ObjectMatrix, "OBJECTNAME")
end,
"OBJECTNAME"
)