1-- Copyright (C) 2007, 2010 - Bit-Blot 2-- 3-- This file is part of Aquaria. 4-- 5-- Aquaria is free software; you can redistribute it and/or 6-- modify it under the terms of the GNU General Public License 7-- as published by the Free Software Foundation; either version 2 8-- of the License, or (at your option) any later version. 9-- 10-- This program is distributed in the hope that it will be useful, 11-- but WITHOUT ANY WARRANTY; without even the implied warranty of 12-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13-- 14-- See the GNU General Public License for more details. 15-- 16-- You should have received a copy of the GNU General Public License 17-- along with this program; if not, write to the Free Software 18-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20if not v then v = {} end 21if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end 22 23v.started = false 24v.n = 0 25v.timer = 999 26v.thingsToSay = 20 27v.thingSaying = -1 28v.timeToSay = 5 29function init(me) 30 v.n = getNaija() 31 node_setCursorActivation(me, true) 32end 33 34local function sayNext() 35 if v.thingSaying == 0 then 36 setControlHint("The last editor mode is Node Edit Mode. (That rhymes!)", 0, 0, 0, 16) 37 elseif v.thingSaying == 1 then 38 setControlHint("Nodes are areas you can define to perform a variety of tasks.", 0, 0, 0, 16) 39 elseif v.thingSaying == 2 then 40 setControlHint("The way these hint bubbles work is defined by nodes, for example.", 0, 0, 0, 16) 41 elseif v.thingSaying == 2 then 42 setControlHint("You can enter Node Edit Mode by pressing F7 in the level editor, or by selecting it from the drop-down menu.", 0, 0, 0, 16) 43 end 44end 45 46function update(me, dt) 47 if getStringFlag("editorhint") ~= node_getName(me) then 48 v.started = false 49 return 50 end 51 if v.started then 52 v.timer = v.timer + dt 53 if v.timer > v.timeToSay then 54 v.timer = 0 55 v.thingSaying = v.thingSaying + 1 56 sayNext() 57 end 58 end 59end 60 61function activate(me) 62 clearControlHint() 63 v.started = true 64 v.thingSaying = -1 65 v.timer = 999 66 setStringFlag("editorhint", node_getName(me)) 67end 68 69