sooo...I've got my tile based RPG map editor working, but i need to know a few things before i can expand it
1) how do i detect when the user clicks on a sprite? (when the use right clicks on an instance of the sprite, it will change image)
2) how do i make text appear above sprites? (ie, on in front of and not behind)
3) how would i stop the user placing lots of sprites on top of each other?
I might not be able to reply to any follow up posts, because i'm moving house tomorrow
below is my code
(DBpro, BTW
)
Rem ***** Main Source File *****
tilenumber# = 100
right# = 32
bottom# = 32
left# = right# - 32
top# = bottom# - 32
load bitmap "tiles.bmp",1
set current bitmap 0
`main loop
do
xpos# = mousex()/32*32
ypos# = mousey()/32*32
gosub _tile_place
loop
`tile placing commands
_tile_place:
if mouseclick()=1
set current bitmap 1
get image 1,left#,top#,right#,bottom#
sprite tilenumber#,xpos#,ypos#,1
tilenumber# = tilenumber# + 1
set current bitmap 0
endif
return
You could take over the world with a programming language like this...
...not that I would attempt to...yes, that'll do...