I’m new and I’m just playing around with game development. Been staring at this for hours trying to figure out what I’m doing wrong but I just don’t see it.
All I want to happen is when the jumper is tapped, he moves up on the y axis. I keep getting different errors when I move things around but here are how things are currently.
– usuals
display.setStatusBar(display.HiddenStatusBar)
local centerX = display.contentCenterX
local centerY = display.contentCenterY
– forward references
local jumper
– preload audio
local function createPlayScreen( )
local background = display.newImage(“snowBackground.jpg”)
background.yScale = 1.3
background.xScale = 1.3
background.x = centerX
background.y = centerY
background.alpha = 0
transition.to ( background, { time=2000, alpha=1 } )
jumper = display.newImage(“jumper.png”)
jumper.xScale = .65
jumper.yScale = .65
jumper.x = centerX
jumper.y = display.contentHeight +100
transition.to ( jumper, { time=2000, y=display.contentHeight - 100} )
local title = display.newImage(“titleG.png”)
title.x = centerX
title.xScale = .65
title.alpha = 0
transition.to ( title, { time=2000, alpha=1 } )
end
local function jumperTap( )
jumper:addEventListener ( “tap”, jumperJump )
end
local function startGame( )
end
local function planetDamage( )
end
local function hitPlanet( )
end
local function jumperJump(event)
transition.to( jumper, { time=500, y=100 } )
end
createPlayScreen( )
jumperTap( )
Any and all help is greatly appreciated.