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.

Newcomers DBPro Corner / Restricting Enemys

Author
Message
Eternal Darkness
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 19th Oct 2003 19:02
Hi,

Does any 1 know how i can restrict the enemys im my game so they only fight when u get into a cetain area.

Thanks
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 19th Oct 2003 19:22
You could make a large sphere, hide it and position it at the same position as the enemy. Then, when it detects a collision between you and the sphere, you can make it attack.
You could also get the distance between the enemy and the player manually using the maths, here's is a function that does that (just a quick note, its not mine, can't remember who gave it to me though)



Then, when you come within a certain distance, run the code your enemy uses to attack.

Cheers,
Kentaree

I would be unstoppable if I could just get started...
Eternal Darkness
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 19th Oct 2003 19:45
THANKS

ETERNAL DARKNESS

Login to post a reply

Server time is: 2024-09-21 05:46:43
Your offset time is: 2024-09-21 05:46:43