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

started 		= false
n 			= 0
timer 			= 999
thingsToSay		= 20
thingSaying		= -1
timeToSay		= 5

function init(me)
	n = getNaija()
	node_setCursorActivation(me, true)
end

function sayNext(me)
	if thingSaying == 0 then
		setControlHint("Hit TAB to enter the level editor, and TAB to exit the level editor.", 0, 0, 0, 16)
	elseif thingSaying == 1 then
		setControlHint("With Aquaria's level editor you can edit levels in real time and see your changes immediately!", 0, 0, 0, 16)
	end
end

function update(me, dt)
	if getStringFlag("editorhint") ~= node_getName(me) then
		started = false
		return
	end
	if started then
		timer = timer + dt
		if timer > timeToSay then
			timer = 0
			thingSaying = thingSaying + 1
			sayNext(me)
		end
	end
end

function activate(me)
	clearControlHint()
	started = true
	thingSaying = -1
	timer = 999
	setStringFlag("editorhint", node_getName(me))
end