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.

DarkBASIC Discussion / I got problems, with collision, help would be appreciated.

Author
Message
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 10th Aug 2004 07:47
Hi

I have been gone for a while, did you miss me? Oh well, I will be gone even more once I start learning c++, oh the horror! I thought with the recent compo, I would maybe try and complete a project, and enter it, but I have been hitting a wall. The problem is collision, I have a bunch of enemy models that are supposed to run up the screen toward the players models, he can position different obstacles to try and stop all the advancing enemies, if there is a hole in his defences, and an enemy slips throuhg, the player loses. The idea is that when and enemy touches an defensive object, it dissapears (for now atleast), but my collision detection doesnt seem to work, the enemies can walk right though the objects I have set up to kill them, even though they should dissapear. Well all my explaining cant do any good without my code, so here it is


I have placed exclemation markes above and below the collision code.

Any help would be greatly appreciated.

Thank you!

Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
Father Anderson
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location: I\'m not so sure...
Posted: 10th Aug 2004 11:19
Taking out the exclamation marks would help.

...

maybe i should keep my smart mouth closed...
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 10th Aug 2004 13:06
The exclamation marks are rem statements so that people can figure out where the collision code is easily, they arent the problem.

Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Aug 2004 20:09
I don't see any SET OBJECT COLLISION ON statements. You need to do this for every object.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Aug 2004 23:07
Or set global collision on.

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 11th Aug 2004 03:03
still nothing, I tried both of those soulutions, and I still cant get the objects to dissapear when they collide. Here is the code again...



Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
Davey B
20
Years of Service
User Offline
Joined: 22nd Aug 2004
Location:
Posted: 22nd Aug 2004 08:37
Try this:

Login to post a reply

Server time is: 2025-05-25 04:16:39
Your offset time is: 2025-05-25 04:16:39