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 / Script Help

Author
Message
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 11th Feb 2008 18:19
Is it possible to make it so if an enemy is damaged, the health it loses goes onto the player?

Thanks

Marc
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2008 02:58
Yes,

The character's FPI script would have a healthless=X condition which cause a plraddhealth=x action when true.

For instance, if we were using the shootclose.fpi for the character then we would add the following changes. (backup a copy first)

Add the following four lines just below the ;Triggers header as shown in this...



Then add activate=9 to state=0 as shown in this...



Now, using the method above he won't give you any gains unless he sees you, and then you gain 20 for every 20 he has lost.
If you change the placement of the activate=9 in state=0 as shown in this...




Then you get a GOD effect (fills you health up) if he takes 20 loss and doesn't spot you.
Otherwise, you gain 20 for every 20 he loses if he has spotted you.
You could apply this to just about any character's AI.

Have fun

Don't forget to visit Conjured Entertainment

Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 12th Feb 2008 20:16 Edited at: 12th Feb 2008 20:24
I tried this but it didn't work

Marc
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2008 20:33 Edited at: 12th Feb 2008 20:40
Well then show me the script your character uses (the one you tried), because it worked when I tested it.

You know you have to lose health before it can work, right?
You can't get an increase in player health if the player is already at max health.
So, let some of them shoot you a few times first, before you try it.
I placed two enemies in my map. One using this script, and one using another script to do damage to me before I attacked him.

Copy and paste the code in a snippet here, just like I did in my post above.
Once pasted, highlight it all and hit that CODE button right above the text entry box. (that makes it a snippet)

Put it up and then I can see whats going on.
If it is some custom thing you don't want to share here in the forums, then let me know and we can do it through email.

Don't forget to visit Conjured Entertainment

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Feb 2008 21:02
Quote: "I tried this but it didn't work"


Well consider the source.


Just kidding..... gotcha back. LOL

Best.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2008 21:13 Edited at: 12th Feb 2008 21:20
It works xplosys... you try it.
It's not smooth because I used increments of 20, but it works.

This does make for a handy type of scifi weapon, so I will tweak it.

Don't forget to visit Conjured Entertainment

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Feb 2008 22:07
Quote: "It works xplosys... you try it."


Don't have to. The concept is good and I can see the code. Nice work. You know I was only kidding, right?

Best.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2008 22:13 Edited at: 12th Feb 2008 22:16
Yeah, but I thought if someone else had it work, then he won't think I am pulling his leg.

It's okay though, I guess he'll post his script, and then we can get it working on his end.

Don't forget to visit Conjured Entertainment

Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 12th Feb 2008 22:24
Ah thanks conjured I got it working now

Marc
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 13th Feb 2008 09:39
Cool, I'm glad you got it working.

I guess you already figured out how to change those values for the amounts of health you want.

Have Fun!

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 06:58:52
Your offset time is: 2024-11-24 06:58:52