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 / How to set the number of player health

Author
Message
Peri
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 10th May 2013 11:41
Hello guys I am new in the scripting of fpsc and I need your help
I want to set the health points to some number, I don't want to add health points or take them I want to change it for example from 100 to 1 without kill the player.

Thenks
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 10th May 2013 17:37
Well, if I understand you correctly, you just want a player to walk into a trigger zone and then have his health drop from 100 to 1.

If this is the case, you would use the plractivateinzone command, and then use plrsubhealth, and use the value of however much health you want the player to lose, making sure that you use conditions so that the player will not be hurt after his health has been drained to the point that you want. Then you would place this script into the main-AI slot of the trigger zone, and then you place the zone in your level.

I'd write the script for you, but it's always better to see if you can figure it out for yourself first. Scripting is the greatest tool any person using FPSC could have at their disposal, and it's best to learn it yourself instead of having other people do it for you. That being said, if you can't figure this out, I'll gladly give you a really good push in the right direction

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 10th May 2013 18:10
Hi Peri
There's also this action "plrsethealth=x". This sets the player’s health to X. Use it with a trigger.
But like Master D said, it's best to try and figure it out yourself first
best
Peri
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 10th May 2013 22:03
I will try, thanks guys
Peri
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 10th May 2013 22:06
Tanks this what I looked for

Login to post a reply

Server time is: 2024-11-23 14:32:35
Your offset time is: 2024-11-23 14:32:35