Hi Guys
Thanks for the reply, Abiz the code you supplied, it doesn’t work for me, only in 90 degrees increment it does, so it disappears for most of the time and only shows at 90 degrees increments only.
Here is the code that I’m using:
[lua]display.setStatusBar(display.HiddenStatusBar);
_W = display.contentWidth;
_H = display.contentHeight;
local monster = display.newText(“a”, 0, 0, “Monsterz”, 120*2);
monster.xScale = 0.5; monster.yScale = 0.5;
monster:setReferencePoint(display.CenterReferencePoint);
monster.x = _W * 0.5; monster.y = _H * 0.5;
local hello = display.newText(“Tap me, I’z hungree”, 0, 0, “BorisBlackBloxx”, 24*2);
hello.xScale = 0.5; hello.yScale = 0.5;
hello:setReferencePoint(display.CenterReferencePoint);
hello.x = _W * 0.5; hello.y = (_H * 0.5) + 80;
local nom = display.newText(“Nom Nom”, 0, 0, “BorisBlackBloxxDirty”, 12*2);
nom.xScale = 0.5; nom.yScale = 0.5;
nom:setReferencePoint(display.CenterReferencePoint);
nom.x = monster.x + 60; nom.y = monster.y;
nom.rotation = 45;
nom.isVisible = false;
function monster:touch(event)
local chomp = {“a”, “A”, “S”, “S”, “T”, “T”, “T”, “S”, “A”, “a”, “A”, “S”, “S”, “T”, “T”, “T”, “S”, “A”, “a”};
if(event.phase == “ended” or event.phase == “cancelled”) then
local function nomnom(event)
if(event.count == 1) then
– This is the first time the timer runs
nom.isVisible = true;
end
monster.text = chomp[event.count % #chomp + 1];
if(event.count == #chomp) then
– This is the last time the timer runs
nom.isVisible = false;
timer.cancel(self.timer);
self.timer = nil;
end
end
self.timer = timer.performWithDelay(30, nomnom, #chomp);
end
end
monster:addEventListener(“touch”, monster);[/lua] [import]uid: 13504 topic_id: 22136 reply_id: 88057[/import]