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 / sprite button help

Author
Message
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 16th Jun 2008 23:34
i think there called sprites
im making a game and im making the menu from the top of my head
im trying to use my skills and not help to make sure im doing it myself.
so i made this menu with this coding so far:


i want it to be that if you click one of the buttons/images you will go to the next bit
i read tdks tutorial but it says if u click on the coords and some other confusing things
but not what i want

Creators of Outscape
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 17th Jun 2008 00:55 Edited at: 17th Jun 2008 01:04
you code won't work because it'll only wait 1 second plus there isn't a if image clicked anyways heres my method that uses sprite collision.

steps:

1.first put sync on and sync rate and stuff

2.make your buttons and make a custom mouse

3.load all you images e.g.
and so on

4.then you need a loop


5.make sprites in your loop and place the mouse sprite last




6. set up sprite collision



when done it should look something like this


and thats all to it

Note:you can add scale sprite to it when the mouse sprite is over it to make the sprite bigger this doesn't do anything but does make it look cooler also if you want perfect pixel collision I recommend windowskillers ultmate collision which can be found here

Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 01:00
try this.



Ok, dont actually put the quotes where the mx and my stuff is...lets say you do have your image at 0,0 and the image is lets say 10x10.
It would look like:


do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 01:05
ill try it 2moro i g2g now
and thanks!

Creators of Outscape
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:06
wow cool did u say i can choose my mouse curser¬!!!!!!!!!!!!!!!!!!!!!!

Creators of Outscape
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 19:17
You can make your own cursor...what you need is an image, load it, hide the mouse (using "hide mouse") then set the sprite with the image number to MouseX() and MouseY()

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:29
im having a problemo


when i press up it freezes and when i click on the sprite it freezes

Creators of Outscape
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:30
ok it doesnt freeze its just the sprites wont go so i cant read the writing

Creators of Outscape
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 19:31
can you upload the media so I can run your code? =P

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:32 Edited at: 17th Jun 2008 19:33
delete sprite 1
doesnt work
Edited:
added sync and it works =D
btw the sprite collison has stop working =(

Creators of Outscape
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:36
here it is:

Creators of Outscape

Attachments

Login to view attachments
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 19:37
Ok, for the press up thing, when you use the print command after loading sprites it doesn't show up too well. Sometimes it doesn't show up at all and if you put it in a do loop then it just annoys the crap out of you. for printing text (it's not much better) but for now use the "Text" command.

it is used like this:


I don't see where "delete sprite 1" would go in your code though.

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:38
i think its all working now
<i attached the sprite and clicking wrong >

Creators of Outscape
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 19:41


Creators of Outscape
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 19:45 Edited at: 17th Jun 2008 19:47
Wow, it certainly is...red! =P

Ok, here is a tip. Don't put your sprite positions in a do loop...it is useless memory usage. Only put your cursor sprite position in the do loop. Take out that cls after the sync, all thats doing is updating the screen and deleting it.

EDITh and a good idea would be to place all of your images in a folder, called "Images", "pictures", or "Media" whatever is compfortable with you. This will make your stuff much more organized.

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 20:10
thankyou

Creators of Outscape
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 20:11
is there a tutorial on how to make a loading bar or somthing

Creators of Outscape
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 17th Jun 2008 20:34
Well...not that I know of, as far as I know a loading bar is just an animated sprite.

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 17th Jun 2008 20:37
ok thanks alot

Creators of Outscape
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th Jun 2008 20:42
put loading bar in the search box at the bottom, I think theres one or two in code snippets.

Dark Physics makes any hot drink go cold.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 18th Jun 2008 01:14
thanks

Creators of Outscape

Login to post a reply

Server time is: 2024-11-25 22:33:36
Your offset time is: 2024-11-25 22:33:36