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 / Game help?

Author
Message
Tylerman35
15
Years of Service
User Offline
Joined: 23rd Jul 2009
Location:
Posted: 24th Jul 2009 16:46
How can i make a click command, so when i click on something it disapears... My game is when you click on a leave it dissapears..
here is my code.

#include "DarkGDK.h"

void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );

dbLoadImage ( "GamePicture.png", 1 );
dbSprite ( 1, 0, 0, 1 );

for ( int i = 2; i < 30; i++ )
{
dbCreateAnimatedSprite ( i, "Untitled1110.bmp", 4, 4, i);
dbSprite ( i, dbRnd ( 640 ), -dbRnd ( 1500 ), i );
}


while ( LoopGDK ( ) )
{
for ( int i = 2; i < 30; i++ )
{
dbMoveSprite ( i, -2 );
dbPlaySprite ( i, 1, 16, 60 );
if ( dbSpriteY ( i ) > 500 )
dbSprite ( i, dbRnd ( 640 ), -dbRnd ( 1500 ), i );
}
dbSync ( );


}
return;
}
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 25th Jul 2009 00:15
make a 1x1 image (alpha channeled if u dont wish to see it)
load it in your game
and in the game loop do the following:


http://img268.imageshack.us/img268/3640/signatureugo.jpg
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 25th Jul 2009 00:24
No, use this. Test if the mouse is over a sprite.



Your_Health = (My_Mood == HAPPY) ? 100 : NULL;

Login to post a reply

Server time is: 2024-10-01 08:34:39
Your offset time is: 2024-10-01 08:34:39