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.

Dark GDK / 2d bullets

Author
Message
Superdeath360
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 24th Nov 2010 02:16
I'm very new to DarkGDK, and can only do basic things like character animation and movement/ collisions.

I'm creating a 2d game as practice, in which a bullet needs to be created from a gun, wherever the gun may be on the screen.

If you could just give me a basic idea of how to do this, I'm sure I could figure more complicated things out. Thank you a lot!

herp derp
StillCOol ProgramerXP
14
Years of Service
User Offline
Joined: 17th Nov 2010
Location:
Posted: 24th Nov 2010 15:22
I think the best way is to use a animation of a bullet i dont know another way ^^

Just Starting Programer
Superdeath360
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 24th Nov 2010 18:39
Quote: "I think the best way is to use a animation of a bullet i dont know another way ^^"



okay..but how would i create the animated bullet wherever the gun may be?

herp derp
MPQC
15
Years of Service
User Offline
Joined: 7th Sep 2009
Location:
Posted: 24th Nov 2010 19:29
You can use dbSpriteX(sprite#) and dbSpriteY(sprite#) to get the x & y coordinates of your gun, then just create your bullet there. But since you seem to be under the impression that the guns moving around, I don't see why you wouldn't already have the coordinates of the gun stored somewhere.
Superdeath360
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 25th Nov 2010 06:57
alright thanks both of you ... im just a noob trying to learn.

herp derp

Login to post a reply

Server time is: 2024-11-19 16:46:31
Your offset time is: 2024-11-19 16:46:31