Hi guys
I'm relatively new to Dark Basic Professional, and I've done the tutorials now and I think I get the idea of how to make games. So that's the good news...
Now here it goes... I think of doing a RTS game, you know where the map scrolls and all. So far I think I do know how to do it, but there's one thing I just don't know how to do it.
Here's what I wanna do: As soon as the mouse hits the border of the screen, the map should scroll into the appropriate direction, like when you move the mouse to the top border of the screen, the map scrolls up. This is not a big deal. But I want to change the cursor to an arrow for the time it is at the border of the screen. And I know how to display the cursor, but I don't know how to delete the graphic, and make the arrow disappear when the mouse leaves the border of the screen.
I show you what I got for the right border only, you get the idea for the other three, so no need to post them.
do
load image "scrollarrow-right.jpg", 1
rem show the cursor for scrolling to the right
if mousex()=1023
hide mouse
paste image 1,995,mousey()
endif
show mouse
loop
At 'paste image' it's 995 on the x axis because the graphic (the arrow) that should be displayed has a width of 28 pixels, which needs to be deducted in order to display it correctly...
I've searched the code base and I couldn't find it...
Thanks for your help guys
1 PRINT "This s..t works!!!"
2 GOTO 1
RUN