Hi. I’m stuck in a trouble of image copying.
I learned how to create new image object by display.newImage.
But I don’t know how to copy it.
I’m making 2D-RPG. Think about map-chips, they need multiple
images like floor, ground, sea, forest…whatever.
I don’t want to load same image path many times.
So, I tried to copy the image object as hImage2, and tried to translate…
but, the result is, only hImage1 is displayed in (200, 400) position.
local hImage1 = display.newImage( “floorChip.jpg” )
local hImage2 = hImage1 --copy
hImage1.x = 0
hImage1.y = 0
hImage2.x = 200
hImage2.y = 400
How can I copy hImage1 to hImage2?
Or is there another way to display a number of “floorChip.jpg” with one time loading? [import]uid: 98774 topic_id: 17681 reply_id: 317681[/import]
Great for RPGs.