Hi and thanks for reading, I am very new to developing and and in the learning phase obviously :). I have been able to to open the games .json map files with tiled and am able to edit the placement of the hero’s starting point and enemy placement, all the tile pieces and have it show in coronas emulator. I have copied and pasted the enemy.lua file and made an enemyTwo.lua file.
1)I’ve added it to map extend.
map:extend( “blob”, “enemy”, “enemyTwo”, “exit”, “coin”, “spikes” )
- Ive linked it into the sprite file inside scene/game/img and attempted to utilize empty room on the sprite file and coded those frames into the enemyTwo.lua file like this:
local sheetData = { width = 192, height = 256, numFrames = 79, sheetContentWidth = 1920, sheetContentHeight = 2048 }
local sheet = graphics.newImageSheet( “scene/game/img/sprites.png”, sheetData )
local sequenceData = {
{ name = “idle”, frames = { 8 } },
{ name = “walk”, frames = { 9, 10, 11, 12 } , time = 500, loopCount = 0 },
Which i assumed would give enemyTwo the appearance relative to enemy.
Where I am finding myself scratching my head the most is with in tiled itself.
So i see in the sandbox2.json file there is 3 enemys, 2 blobs and 1 enemy(soldier guy im trying to replicate files for)
The img file for the enemy is actually skeleton.png. I look at the properties of skeleton.png and within the “type” it says enemy so i naturally make a copy of said image and within "type i put enemyTwo Because there is clerly no other thing in the properties linking this to the enemy.lua file associated with it.
I cant get enemyTwo to show up within Tiled nor understand how to link it to the game/enemyTwo.lua files.
I have scoured and scoured for more details and am just not having luck. Any help would be greatly appreciated. Thanks in advance!