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 / Touch Death?

Author
Message
AlanC
18
Years of Service
User Offline
Joined: 28th Sep 2006
Location: Seattle, WA
Posted: 10th Oct 2006 00:01
Sorry I dident know what to name the topic. But how do I lose health by a person touching me? You know like the skull. When it runs into you you lose health. How do I make that happen to like a zombie? Whats the script? Thanks for checking this out!

hhmmmmm........ hi
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 10th Oct 2006 00:47 Edited at: 10th Oct 2006 00:48
Use plrdistwithin to determine when the player is close to the entity, and plraddhealth to control the health loss.

A simple script will look like this:



When used as a characters AI Main, it will subtract 1 health point as long as the player is near or touching the character.

Happy game making.

The forum provides a means to hide our true identity. Too bad we always screw up and let it be seen.

Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 14th Oct 2006 05:18 Edited at: 14th Oct 2006 05:19
Nice script Xplosys... However, adding a timer would be more desirable. Otherwise the entity acts like a hurtzone.



Nue B. or not Nue B. That is the question.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 14th Oct 2006 14:52
don't use a timer, it messes with other timers in the level. Your better off randomising when damage is caused.



:state=0:plrdistwithin=50,random=5:plraddhealth=-1

try that.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 14th Oct 2006 16:39
Quote: "Otherwise the entity acts like a hurtzone."


I thought that was what he asked for, but it doesn't matter because it does not appear that he ever came back to look for an answer.

The forum provides a means to hide our true identity. Too bad we always screw up and let it be seen.

Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 15th Oct 2006 06:18 Edited at: 15th Oct 2006 06:19
Quote: "don't use a timer, it messes with other timers in the level. Your better off randomising when damage is caused.
"


If you have Empty's FPSC MOD, you can use "entitytimer" which will NOT effect other timers of the level.

Nue B. or not Nue B. That is the question.

Login to post a reply

Server time is: 2024-11-23 01:26:42
Your offset time is: 2024-11-23 01:26:42