dofile_once( "data/scripts/lib/utilities.lua" )

local entity_id    = GetUpdatedEntityID()
local x, y, angle = EntityGetTransform( entity_id )

local old_entity = tonumber(GlobalsGetValue("old_recall", "0")) 
local teleport_back = tonumber(GlobalsGetValue("teleported_back", "0"))

if(teleport_back == 1)then
    EntityKill(old_entity)
    EntityKill(entity_id)
    GlobalsSetValue("teleported_back", "0")
end
