So I’m terrible at this. I tried plugging someone’s clock into my game to start a varying sequence when after 225 overall clicks if there’s been less then 15 seconds between clicks the player will go into a more captain falcon like punch sequence. I plan on making a cookie clicker wario ware hybrid. Cookie clicker to level up for a punch out like game that will both give you access to unlocking mini games I’ve been making to test mechanics. I’ve got much moreover want to do but I feel like this is a reasonable goal. This is my main chunk of code and I know I’m formatting it wrong to post but I’m not quite sure how to. The Sprite cycled fine before the clock. The reason for the break in the else if and the logical listing is to draw the hand behind the punching bag at times. I have animations I have in mind for the bag but I’m using a static until I work out animations and the track for the main Sprite the timer and counters.
-- Punchies_00.01
function draw()
--supportedOrientations(LANDSCAPE_ANY)
--displayMode(FULLSCREEN)
noFill()
noSmooth()
noStroke()
pushStyle()
background(210, 146, 146, 255)
if player == punch_a then
sprite(nanner_pa,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_b then
sprite(nanner_pb,WIDTH/2,HEIGHT/2, 256, 256)
end
sprite(pbag_a, WIDTH/2,HEIGHT/2, 256,256)
if player == idle_a then
sprite(nanner_a,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == idle_b then
sprite(nanner_b,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_c then
sprite(nanner_pc,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_d then
sprite(nanner_pd,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_2a then
sprite(nanner_p2a,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_2b then
sprite(nanner_p2b,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_2c then
sprite(nanner_p2c,WIDTH/2,HEIGHT/2, 256, 256) elseif
player == punch_2d then
sprite(nanner_p2d,WIDTH/2,HEIGHT/2, 256, 256)
end
end
function timer(s)
if s~=nil then
et=ElapsedTime+s
clock = true
end
if et-5<ElapsedTime then
clock = false
end
end
function touched(touch)
--- score
if punches == 15 then
print ("1")
end
if punches > 15 then
punches = punches - punches
end
--- input
if touch.state == BEGAN and
player == idle_a then
player = punch_a
end
if touch.state == BEGAN and
player == idle_b then
player = punch_a
end
if touch.state == BEGAN and
player == punch_d then
player = punnch_a
end
if touch.state == ENDED and
player == punch_a then
player = punch_b
end
if touch.state == BEGAN and
player == punch_b then
player = punch_c
end
if touch.state == ENDED and
player == punch_c then
player = punch_d
end
if touch.state == ENDED then
punches = punches + 1
focus = focus + 1
end
if punches == 15 then
powerlevel = powerlevel + 1
end
if touch.state == BEGAN then
timer(20)
end
end
Here’s a quick snapshot of my sprites. I can art in exchange for some help.
http://tinypic.com/r/14uvx1t/9