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 / need help, collision is all screwed up!

Author
Message
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 19th Sep 2004 11:04
With the Help of merix, I have been edging toward completing my first game. I have, however encountered a strange problem. It deels with collision. I had an idea to create a simple pathfinding command for the enemy, or object e to move around object t(a barrier), here was that code...

for e=6 to 15
for t=204 to 206
if object collision(e,t)>0
position object e, object position x(e)+1, object position y(e), object position z(e)
endif
next e
next t

But it wont work, and now neither will the collision with the target object (object 202). I have encluded the complete source code in an effort to track down this problem....



I will sum up, what the code is supposed to to...

the bullets are supposed to be fired from the machine gun nest at a target object (202), when and enemy collides with object 202 its supposed to dissapear, the same applies for every other object except for the barriers (204 to 206) which are supposed to make the enemys go around them. The enemys are objects 6 to 15, and object 100 to 150.

Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 20th Sep 2004 04:35
Any Ideas?

Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.

Login to post a reply

Server time is: 2025-05-24 23:42:12
Your offset time is: 2025-05-24 23:42:12