-- Star Wars Empire at War: Secrets of a Fallen Empire
-- Lua Script: //Scripts/GameObject/ObjectScript_KillOnSpawn.lua
-- Author: Galyana
-- Updated: 6 February, 2026

-- Kill the object immediately as it spawns in
-- Used to fake a deathclone object for skirmish defense stations

require("PGStateMachine")

function Definitions()
	ServiceRate = 1
	Define_State("State_Init", State_Init);
end

function State_Init(message)
	if message == OnEnter then  
		Object.Take_Damage(10000) --Kill object
	end
end