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 / Collision. Why doesn't it work?!

Author
Message
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 12th Oct 2003 08:40
I am making a FPS game and can't get the collision for the enemie's sphere of sight with the player to work. Here is the Enemie's AI(where the collision is)
key:
50=line of sight
1=player
10=enemy
2=player bullet
20=enemy bullet

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Oct 2003 12:17
If your problem is with firing the bullet, there is nowhere in that sub where the bullet is moved... you just position it at the specified location then leave it...

You need to move it (not too sure how to do that)

Hope I Helped...

Knowladge Belongs To The People...
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 12th Oct 2003 19:50
My problem is that the program doesn't notice the collision between object 50 and object 1.

Am I an Idiot...or is everyone else just really smart?
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Oct 2003 00:16 Edited at: 13th Oct 2003 00:17
Can't tell from the source you posted what objects 1 and 50 are doing. However...

1. trying object collision(50,1) sometimes it makes a difference

2. try using INTERSECT OBJECT, your bullet may be going too fast to ever collide (that is, one frame it's in front, next frame it's behind).

I can't remember if DBC has INTERSECT OBJECT.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 14th Oct 2003 03:55
I don't think it does. I've already tried reversing the numbers. Let me explain what I'm trying to do. I didn't understand the line of sight stuff so I am attaching a huge hidden sphere to the enemy. the sphere works as his line of sight. If you collide with the sphere, the enemy sees you. However, when you hit the sphere, the gosub routine doen't kick in.

Am I an Idiot...or is everyone else just really smart?

Login to post a reply

Server time is: 2025-05-21 15:01:31
Your offset time is: 2025-05-21 15:01:31