Not sure if I've got the point here, if so, why does not use entity name, instead of entity id?
I'd wrote this lua script and if works fine for me in one project I'm working now:
e_pressed3 = 0
decal_name = {}
enti_id = {}
function burnning_home2_init_name(e,name)
decal_name[e] = name
enti_id[e] = e
end
function burnning_home2_main(e)
LoopSound(e,0)
if g_KeyPressE == and e_pressed3 == 0 then
PlayAnimation(e,0)
for i = 1, g_EntityElementMax,1 do
if decal_name[i] == "church_frags (home_burning)" then Spawn(i) end
if decal_name[i] == "Torch Flame" then Spawn(i) end
if decal_name[i] == "home4_003_sostre_decal (burning)" then Destroy(i) end
if decal_name[i] == "Fire Wall" or decal_name[i] == "Lit Smoke" then
SetPosition(enti_id[i],g_Entity[i]['x'],g_Entity[e]['y'] - 2.0,g_Entity[i]['z'])
end
end --for
e_pressed3 = 1
end --g_KeyPressE
if g_KeyPressE == 0 then e_pressed3 = 0 end
end
Add this script to each entity you want and relief in their name, of course each has to have diffente name if yoy want to act in only one at time. ID can change but name does not.
If I don't got the point right so, excuse me.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4