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 / scrpit help

Author
Message
trentb95
15
Years of Service
User Offline
Joined: 18th May 2009
Location: AUS, VIC
Posted: 5th Jun 2009 16:32
.. im sorry for asking this again.. but is there a script out that thats free and makes it so if the person you have to protect from.. say.. a heard of zombies.. gets killed you fail? so its like.. enemys attack and chase you AND the person as he follows you and if he dies you have to restart the mission.
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 5th Jun 2009 19:37
While I don't think a script like this exists, I can tell you how to pull this off.

1. Make a copy of the script destroy.fpi for the character that you need to protect and rename it something like "protectthischaracter.fpi".

2. Using FPI Editpad (or similar scripting program), add a line at the beginning of the script that says:


3. In a custom script named "customscript.fpi" (or whatever you want to name it) add a line similar to this:


In the above code, x is the state you are in (more than likely 0), and the plrsubhealth amount is the amount of health that the player can have at maximum.

4. Place the above created custom script in a trigger zone.

5. Place the custom script from steps 1 and 2 as the destroy script of the character you need to help.

Not that hard, huh?

Priest of the Church of Joe Wood

In memory of Nanee. 9/1/1993 - 5/16/2009. Rest in Peace, little girl.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 5th Jun 2009 19:39 Edited at: 5th Jun 2009 19:41
Leon globalvar=99 isn't a condition and plrsubhealth isn't an action I suggest using something like this



and then use the other script Leon gave you

Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 5th Jun 2009 21:15
Quote: "Leon globalvar=99 isn't a condition and plrsubhealth isn't an action "

Well, then, you need to have the guide re-written. According to the guide, globalvar=x is the global variable you wish to work with, and plrsubhealth=x is the amount of health you want removed from the player's health total.

It really is in the guide. And yes, this does work.

Priest of the Church of Joe Wood

In memory of Nanee. 9/1/1993 - 5/16/2009. Rest in Peace, little girl.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 5th Jun 2009 21:22
Quote: "Well, then, you need to have the guide re-written. According to the guide, globalvar=x is the global variable you wish to work with, and plrsubhealth=x is the amount of health you want removed from the player's health total"


globalvar=x is the variable you wish to work with but you wrote it in the script as a condition.

plrsubhealth=x does not exists instead you use plraddhealth=x with a negative value.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Jun 2009 02:08
globalvar is an action.

plrsubhealth does exist. I have no clue why lee felt it pertinent to include it since the add health command did a fine job as it was.


The one and only,


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 6th Jun 2009 02:10
Quote: "plrsubhealth does exist"


Never saw it but you've been inside the cave of codding so i believe you

Login to post a reply

Server time is: 2024-11-25 02:51:12
Your offset time is: 2024-11-25 02:51:12