-- activate a temp barrier with a faulty orb

dofile("scripts/entities/entityinclude.lua")

function init(me)
	node_setCursorActivation(me, false)
end

function activate(me)
	orb = node_getNearestEntity(me, "EnergyOrb")
	if orb ~= 0 and entity_isState(orb, STATE_CHARGED) then
		debugLog("BOSS NODE ACTIVATED")
		barrier = getEntityByID(5)
		if barrier ~= 0 then
			debugLog("Setting barrier to pulse")
			entity_setState(barrier, STATE_PULSE)
		else
			debugLog("Did not find barrier")
		end
	end
end

function update(me, dt)
end
