Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / trouble with the sprite exist command

Author
Message
mo2970
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location:
Posted: 16th Jun 2006 21:11
I have decided to start with a 2D project.i don't understand how to use the sprite exist command, i have code to load the image and assign the sprite but i still don't have a sprite on the screen this is what i have

i would put the command in there but i don't know what to use as the 'return integer' explained in the tut.
Hazviz
18
Years of Service
User Offline
Joined: 12th Jun 2006
Location: Alnwick, UK
Posted: 16th Jun 2006 21:24
Try this:



Hope this helps
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 16th Jun 2006 21:39
Because you have put 'sync on', then display only updates if you do a 'sync'

It is customary to have a loop aswell to see things properly;

do
sync
loop

instead of wait key, or you may get away with just;

sync
wait key

or because you are not doing a loop and only doing 2D stuff you actually need a double sync;

sync
sync
wait key

Also, your image will look blurred because you have not used the optional ,1 flag on end of load image command.

Boo!
mo2970
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location:
Posted: 16th Jun 2006 21:43
okay thank you now it works but its all blue do i need to set color? and how?

Login to post a reply

Server time is: 2024-09-25 01:30:35
Your offset time is: 2024-09-25 01:30:35