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 Scripts / Making an NPC unresponsive to player attacks?

Author
Message
kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 16th May 2010 08:18 Edited at: 16th May 2010 08:18
I know how in a lot of FPS, there are civilians just walking around a city and if you try to shoot/punch them, nothing happens and they just continue on their way, speaking or whatnot. I wanted to have something similar in my game to create a distinction between the NPCs and enemies.

The problem is that even if I set a character's health to 0 to make it immortal, it still reacts to my weaponry by bleeding/falling over, etc. Now, the bleeding I could perhaps get rid of in a roundabout way by creating a separate version of the character and removing the blood decal, but that doesn't prevent the character from falling over when, for example, I punch at it with the MP9 fists. Is there any way to change this and make a character unresponsive to damages? Thank you in advance!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th May 2010 04:35
Make your character an entity (like crates) with a very basic animation for walking/standing. Since they are not TECHNICALLY characters, they won't react like one.

That may help for stationary NPCs, but not for the ones that follow waypoints.

Just a suggestion for you to consider.


The one and only,


HazardStudios
14
Years of Service
User Offline
Joined: 3rd Jan 2010
Location:
Posted: 17th May 2010 21:42
Instead of setting the NPC's health to 0, change it to something crazy, say 1000000. I have tried this in the past and the character will not bleed, fall over, or react in any way.


the apocalypse begins... 20/1/2010
kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 14th Jul 2010 17:44
I'm sorry to revive this thread again, but I wanted to see if anyone else had any other suggestions. I appreciate the ones offered so far, but I unfortunately did need the characters to follow waypoints, and perhaps I'm doing it incorrectly, but the character still reacts to me when I set it at 1000000. As a matter of fact, I even tried higher numbers, but if I make it too high, the number converts itself into a negative number (ex: -2147483648).

Login to post a reply

Server time is: 2024-11-24 21:45:14
Your offset time is: 2024-11-24 21:45:14