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.

FPSC Classic Product Chat / Enemies causing melee damage through walls.

Author
Message
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 5th Dec 2008 04:18
Is there a way to make it so that non player characters cannot reach through walls? I have search the forums and have found reference to walking through walls, shooting through walls and falling through walls. I have found nothing about how to keep enemies from reaching through walls or causing melee damage through walls.

Can this be done without rewriting the game engine?

Patience and tolerance are the keys to the passage of knowledge. Even the ones that know the most started with many questions.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Dec 2008 05:44
You could try using a raycast to determine if there is a wall between the player and the entity before doing a melee attack.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 5th Dec 2008 05:58
Please excuse my ignorance but..... Huh?

Patience and tolerance are the keys to the passage of knowledge. Even the ones that know the most started with many questions.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Dec 2008 06:21
Your problem is not a collision issue, it's a script issue.

You'll need to change the script to keep this from happening.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 5th Dec 2008 09:02 Edited at: 5th Dec 2008 19:11
That having been said. I feel compelled to ask: What changes do I have to make to this script to make it do what I need regarding this certain issue?




EDIT:
I have tried using the raycast in many places in the script it does not seem to be working like people say it should. Maybe I am not doing it right. Could someone please tell me how to use the raycast and where in the script it should go?

Patience and tolerance are the keys to the passage of knowledge. Even the ones that know the most started with many questions.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Dec 2008 21:52
Well, this part certainly seems wrong...



Aside from that, the only time the mummy is checking for player visibility is when it starts up to attack you. After that, it doesn't need to see you in order to attack you.


Grab the community guide and read some scripting tutorials. Perhaps you'll understand a bit better afterwards.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.

Login to post a reply

Server time is: 2024-10-11 19:29:01
Your offset time is: 2024-10-11 19:29:01