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 / Player wins when they die

Author
Message
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 25th Feb 2010 03:35 Edited at: 25th Feb 2010 03:39
Is there a way to make a script so when the player dies, they win the level? I've been trying on FPI EditPad, but haven't found the right way.

"Why does everyone quote ButterFingers for their sig?"-Inspire
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 25th Feb 2010 03:58
I did the same thing for my nuke scene, where the player won the game when they "died". What I did was have a check for the player's health, if it was less than the set value (e.g. less than 2 if you want it when dead), if it was then show a black HUD and move the player to a winzone. A better version would be to use Project Blue/Green, and have an entity spawn when your health is less than a value and set the Objective to 1.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 25th Feb 2010 21:46 Edited at: 25th Feb 2010 22:53
Okay, i'll try that right away! Thanks a lot!

EDIT: Since this is my first script, could someone check this before I mess up my FPSC possibly by putting this in? I don't want you to test it, just check my "grammar."



I'm guessing it's really bad and won't work?

EDIT Again: Yep, just tried it...doesn't work. I put the script in a trigger zone...Maybe I'm not supposed to do that? I dunno. I'm a n00b at scripting...any suggestions?

"Why does everyone quote ButterFingers for their sig?"-Inspire
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 4th Mar 2010 01:57
Well I made a revised script. But it still doesn't work...I'm using x10 btw. Err...any help?

Could it be that x10 doesn't work with some of those commands?

"Why does everyone quote ButterFingers for their sig?"-Inspire
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 4th Mar 2010 02:27
Well, there's nothing in it to hurt the player... Try:



Also, the
Quote: ":state=2,:"


line was problematic. That comma should not be there.

Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 4th Mar 2010 03:58
Here's a script which will move you when you're almost dead:

:state=0,plrhealthless=5:plrmoveto=win

Don't forget to place a trigger zone somewhere named "win".


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 4th Mar 2010 22:22
Hmmm....
@Shadowtroid
Unfortunately, I'm trying for "guy walks in, kills everyone in sight, you win when he kills you." But I will save that to use at some other time (I will give credit, yes)

@ Marc Steene
I just tried that, but no success. You do put the script in a trigger zone right? And make an entity named win with objective=1? I made a level with The trigger zone, an enemy in there shooting you, and the entity "win" out on a platform where you can't see it from inside.
Here's the revised-revised script
:state=0,plrwithinzone=1:state=1
:state=1,plrhealthless=5:plrmoveto=win

I probably did something wrong in there...

"Why does everyone quote ButterFingers for their sig?"-Inspire
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 4th Mar 2010 22:35 Edited at: 4th Mar 2010 22:49
Oh, ok then. Try this:



Use a winzone named win.

Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 4th Mar 2010 22:47 Edited at: 4th Mar 2010 22:59
Ooooh....never thought of it like that. I'll try that right away.

Edit: Tried it, but didn't work I'm starting to think X10 can't work with that? Well, here's my trigger zone options picture(attached). Maybe I did something wrong with setting it up? I did put a win zone with the name "win." Is it that my win zone is blocked by a wall?

"Why does everyone quote ButterFingers for their sig?"-Inspire

Attachments

Login to view attachments
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 5th Mar 2010 01:19
Hmm... Maybe, because I'm using X9...

It's really hard for me to help, I don't use X10...

Try making a entity named win in a winzone. Maybe you can't teleport to zones or something.

Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 5th Mar 2010 04:14
Okey, I'll try that. *sigh* @ x10. I only use it 'cause I don't want my parents to notice that I'm not using the $70 program they bought me =/ And the lighting FX, and ragdolls...and nicer textures...are a nice touch.

"Why does everyone quote ButterFingers for their sig?"-Inspire
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 5th Mar 2010 04:16
But don't worry, support for X10 mods are coming soon. When that comes, all will be right with the world.

Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 5th Mar 2010 04:18
Hope so I can't wait til x10 mods. And the script is supposed to be in a trigger zone, right?

"Why does everyone quote ButterFingers for their sig?"-Inspire
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 5th Mar 2010 08:00
The script is supposed to be a trigger zone, and the winzone is supposed to be called "win".


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 5th Mar 2010 22:56
meh. doesn't work... I put on my sad face @ x10's fail coding.


"Why does everyone quote ButterFingers for their sig?"-Inspire
Pandagamesorg
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location: check your moms room :D
Posted: 11th Mar 2010 00:24
Is there a set location where the player is supposed to die? if so you could hide a teleporter in that room and name that win then make that teleporter come out at a win-point

Login to post a reply

Server time is: 2024-11-25 01:34:30
Your offset time is: 2024-11-25 01:34:30