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.

Author
Message
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 4th Jan 2009 16:44
Hi can you help me with the sprites

How can I use this sprite in my game

please help me
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 4th Jan 2009 17:01
To use those sprites, you have to separate them and save them as an individual image and load them each into DBP like so,



When you load the image be sure that they are in the same directory with you source file. You can add a directory to load with the image. Example,



Your sprites represent the following.

sprite 1,x,y,1 - Your sprite number, be sure that this is specific and different from all of the others or you will get a runtime error.

sprite 1,x,y,1 - The x or left or right position of your sprite. This is where you want your sprite to appear on the screen.

sprite 1,x,y,1 - The y or up and down position of you sprite. This is where you want your sprite to appear on the screen.

sprite 1,x,y,1 - This is what the sprite is. The image number of the image you loaded should be here if you want that image to be a sprite.

Now since you are using DBP a backdrop will come up (a big blue thing) so you can use the command,



Or if you want the backdrop (best) but a different color, use this command.




Use the DBP tutorials for a better explanation and welcome to the forums.


Cheers and good luck,
Zeus
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 4th Jan 2009 17:19
thanks you very mych for your quick reply but can you tell me how to animate them after loading them and it would be very nice of you if you tell me how to move it and clear the background of the images
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 4th Jan 2009 18:46 Edited at: 4th Jan 2009 22:21
Quote: "To use those sprites, you have to separate them and save them as an individual image and load them each into DBP like so"


Why would you do that? When you can save all the animation's/Sprite images of the sprite you want to animate in to one image then use create animated sprites and Play Sprite to animate them?

Quote: "
load image "bob.png",1
load image "jim.png",2

sprite 1,x,y,1
sprite 2,x,y,2
"


Using one sprite on each image of the same sprite shouldn't be necessary.
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 4th Jan 2009 22:08
thanks i thought so too thanks for your reply but one last eish.
How can I move it then?
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 4th Jan 2009 22:28 Edited at: 4th Jan 2009 22:29
Quote: "How can I move it then?"

To move the sprite up just subtract the y value of the sprite, to move down add instead of subtracting. To move right add the x value, to move left it's vice versa.

the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 5th Jan 2009 12:28
ok thanks

Login to post a reply

Server time is: 2024-11-24 15:01:17
Your offset time is: 2024-11-24 15:01:17