-- LUA Script - precede every function and global member with lowercase name of script + '_main' local playingsound = {} function buildingdestroy_init(e) playingsound[e] = 0 end function buildingdestroy_main(e) if g_Entity[e]['health'] < 5 then if playingsound[e] == 0 then playingsound[e] = 1 PlaySound(e,1) SetAnimation(0); PlayAnimation(e); ActivateIfUsed(e) end end end