I need help with sprites
I was wondering if anyone knew how to get the x y coordinates of a sprite.
:)
I was wondering if anyone knew how to get the x y coordinates of a sprite.
:)
The typical solution is you manage the placement of objects.
Look at the actor class code >> https://microstudio.io/i/Loginus/actoratan2/
thanks! I am also wondering if theres a way to get the position of a "sprite" which is on the map. I would be healp full for my dungeon crawler. :)
map = new Map( width_in_tiles, height_in_tiles, tile_pixel_width, tile_pixel_height )
map = maps["name_map"]
map = existing_map.clone()
printMap = function( map )
for x = 0 to map.width
for y = 0 to map.height
print( map.get( x, y) + " "+ (x*map.width+y))
end
end
end
pri( maps["map1"])
The get()
method of the Map
class returns the name of the Sprite that is in a given cell.