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 / SpriteCollision is not Working!

Author
Message
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 24th Jun 2011 00:54
Hey Guys!

So im trying to finish my game here, but now a bug appeared..
The spritecollision is not working ...


Here's the code:



what is wrong?

Learning C++
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 30th Jun 2011 04:15
In

if(!dbSpriteExist(4))
should be if(dbSpriteExist(4))

That's the first thing I saw.... There may be more.

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 9th Jul 2011 02:00 Edited at: 9th Jul 2011 02:14
ahh thanks a lot man i will fix and edit soon

@edit
It didnt work

Learning C++
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Jul 2011 05:07
Hi, could you give a bit more detail as to what isn't working. You check for collision for multiple sprites, does the collision not work anywhere or does it not work with specific sprites?

One other thing I saw was this:

I don't know anything about the logic of your game so this may not be the problem but should the dbDeleteSprite(5) be changed to 6, 7 & 8 in the relevant if statments?


vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 9th Jul 2011 23:39
well, srry for not being specific xD

My game is like you have a headquarters

then there are pirates comming to your HQ.

You need to send bombs to the pirates.

Whats not working is the collision between the boat (4) and the player HQ (1)...

Learning C++
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 9th Jul 2011 23:46
@EDIT:

Hey hey, old school wins again

I made this:


It worked XD

No problem about the collision anymore... but if you can fix the problem it would be great.

This is the updated Code:




Thanks a lot for this amazing wrapper ^^
PS: My game sucks..

Learning C++
VB6 Advanced: 4/5
VB.NET Advanced: 4/5

Login to post a reply

Server time is: 2024-05-18 05:24:34
Your offset time is: 2024-05-18 05:24:34