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 / Ahhh he's chasing me! (i wish)

Author
Message
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 1st Oct 2003 03:30
i want to make a code were if i come within a certin area of an enemy, he hcaises me, until he gets a certin distance close, then stops. I know it has something to do with the Distance formula, but I tried that and it only worked have the time, plese help.

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 1st Oct 2003 06:33
Have you checked out he tutorial that comes with Dark Basic Classic? It has the monster chasing you. You can then make him chase you only if his distance from you is greater than whatever and smaller than whatever.

Good Luck

Xander - Bolt Software

It doesn't matter if it is confusing, as long as it works
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 2nd Oct 2003 06:31
I couldnt find it, could you post the code?

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Oct 2003 07:33
Here it is: (its called Iced)



Hope I Helped...

If Quizz's Are Quizzical, Then What Are Test's?
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 2nd Oct 2003 20:58
i think the tutorial bolt means is the one that you can follow with the manual, all the source and an html guide can be found in the
darkbasic/tutorial folder. and it includes a basic fps, with hud, rocket firing, particles, sound, music, matrices and very basic enemy AI


Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 2nd Oct 2003 21:20
Yeah, that is the one I mean, the tutorial that comes with Dark Basic Classic. You should have it...

Xander - Bolt Software

It doesn't matter if it is confusing, as long as it works
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Oct 2003 21:25
Get a function that calculates distance between two points.

Then, you'd use something like this:



c:/dos
c:/dos run
run dos run
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 3rd Oct 2003 04:31
thanks all, i typed the distance code wrong

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4

Login to post a reply

Server time is: 2025-05-20 23:13:10
Your offset time is: 2025-05-20 23:13:10