I’m having some difficulty placing my sprite in the map in the desired location.
I do the following, but whatever I set locX and locY to, the sprite is in the top left hand corner of the screen.
[lua]
local startX = 20
local startY = 12.9
local blockScale = 15
mte.goto({locX = startX, locY = startY, blockScale = blockScale})
local startPos = mte.getObject({name=“startPos”})
local sheetInfo = require(“Hurricane”)
local myImageSheet = graphics.newImageSheet( “Hurricane.png”, sheetInfo:getSheet() )
local hurricane = display.newSprite( myImageSheet , {name=“fly”, frames={1, 2, 3, 4, 5, 6}, time = 800} )
local setup = {
kind = “sprite”,
layer = 4,
locX = startPos[1].x,
locY = startPos[1].y,
levelWidth = 43,
levelHeight = 54
}
mte.addSprite(hurricane, setup)
[/lua]