Hi, I am modifying the initial BalloonTap program in order to better understand how Cortana works in order to make my own game app. I have tried to read the lists of commands but haven’t found what I thought I wanted.
Question one:
I want the balloon to hold still when I click-and-hold it. I can’t find the Event that will allow me to write the code. Nor can I find the Physics command that will make it hold still.
This is what I have so far:
local function holdBalloon()
balloon:applyForce( 0, 1, balloon.x, balloon.y)
end
balloon:addEventListener( “touch”, holdBalloon )
I don’t know how to make it differentiate between ‘touch’ and ‘tap’. What’s the difference? IS there a ‘hold’ type event at all?
Question two:
So, I added the text that counts the number of taps. Fine. I want it to be on the bottom (in the ‘ground’ bar) rather than in the sky. What do I change to do that? (My ‘ground’ image is a) right at the bottom of the screen and B) 50 px high.)
My code as is:
local tapText = display.newText( tapCount, display.contentCenterX, 20, native.systemFont, 40 )
tapText:setFillColor( 0, 0, 0)
Do I add something to do with display.contentHeightY??
I realise that this would have to go AFTER the ‘platform’ block to be viewed over the top of it.
Hope someone can give me some tips. Thanks!