Code: Select all
function onInputUpdate()
if(player.upKeyPressing)then
-- do stuff here
end
player.upKeyPressing = false
end
Code: Select all
function onInputUpdate()
-- you code to handle keys --
player.upKeyPressing = false
-- ... --
end
. If you want to deactivate the player input then you have use onInputUpdate() and set player.runKeyPressing (or other key values) to false.PGE Wiki wrote:Static Player Functions (Overworld and level)
Code: Select all
levelTitle = world.levelTitle
Code: Select all
levelTitle = world.levelTitle.str
Code: Select all
local levelTitle = world.levelTitle
if(levelTitle)then
local levelObj = Level.getByName(levelTitle)
if(levelObj)then
local filename = levelObj.filename
end
end
:cry :Code: Select all
function onLoad()
Graphics.activateOverworldHud(WHUD_NONE)
world_frame = Graphics.loadImage("../HUD/world_frame.png")
Graphics.placeSprite(1, world_frame, 0, 0)
end