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 have player death as a win condition

Author
Message
Sinister Spoon
11
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 28th Nov 2014 14:02
OK i saw a thread requesting a way to have the player die and have it count as a win, there is a way to do this, in fact several ways and since its the main feature of the game Im currently working on Im really loathe to share it but share it I shall!

Method 1:

have a trigger zone or winzone covering the entire map and place this code into its main fpi (same as winzone code only with an added condition that the player must be dead)



The problem as Ive encountered it with this method is that it will indeed register as a win criteria in the test game environment but doesnt seem to work in a built game

Method 2:

This is much simpler, where you make it LOOK like the player has died, but instead simply teleport them to a winzone.

ie the player has 100 health, so



which makes it look as tho the player is taking damage, it then black screens like they died and the next level loads, or an image, hud, video etc etc

Method 3:

Combining the two:



Again doesnt seem to work in built games, but test it and see for yourself

Hope that helps add some new depth to the gameplay options available to fpsc developers

smoke em if you got em
xplosys
13
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Nov 2014 17:09
I remember doing this a few years ago and as you did, found that the best way was to catch the health before it got to 0. What you have to consider is what type of damage the player is taking from what sources, and be sure that your condition CAN be met. If you use a low player health (say 5) to determine when to call it a win, you have to make sure that something is not inflicting more damage (say 30) than will take the player below 0 before you can catch it.

So if the player has 25 health left and you pull the plug at less than 5 and something does 30 damage.... you loose because the player dies before the less than 5 is reached.

Brian.

Sinister Spoon
11
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 28th Nov 2014 17:21
Exactly right.

It seems an odd quirk of FPSC to allow you to use plralive as a condition but only enable you to make an action on that condition if the value is 1, at least when it comes to player progression it would seem that theres an inherent requirement in fpsc source somewhere that the player MUST be alive to progress to the next level.

(Maybe you can verify this Xplosys? Im aware you have modded the source previously? At least I think you did? I may be mistaken its been years since I logged in and no mods ever worked for my system which is a pity but also is why Im so happy to have v1.20 with the very things i needed added to fpsc now!

In all honesty Ive only extensively tested methods 2 and 3 and personally, like you say, the only realistic way is to have tiny increments of damage to make sure you dont inadverntantly kill the player by mistake.

Personally I disable all huds during game as theres no need to display health, lives etc to the player in my game, you succeed when you die its very boolean so i set their health to 9999 and decrease in increments of 10 everytime they 'die' and reset their health every level just as a precaution, I just thought it was an interesting quirk and something ive seen requests for (locked hence the new thread)

Hope I didnt step on anyones toes heh

smoke em if you got em
xplosys
13
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Nov 2014 18:07
Quote: "It seems an odd quirk of FPSC to allow you to use plralive as a condition but only enable you to make an action on that condition if the value is 1,"


Odd, but so lifelike, no?

I know what you mean and I have to think it was just something done very early on as just a simple trigger. Who ever thought of options after death or winning when you die? Oh wait...

So what is the concept of your game that causes you to win when you die, if you can share that?

No, I've never modded the source and though I can kind of follow the code in most cases, I wouldn't know where to begin working with it. I've never seen the need for lives and health HUDS. Why would you want to know when you're about to die? So you can be careful? Good thing we don't have such warnings in real life.

Sinister Spoon
11
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 28th Nov 2014 18:30
I cant help but agree with all of that

Very insightful and almost poetic in an abstract kinda way

Gaming is an odd area in that respect where the player is constantly being reminded of how close they are to death, death being such a common failure state, but in real life there are so many different failure states that to reduce a game to such a basic win/lose criteria misses out on the point of a game in many cases.



I know it probably sounds really dumb trying to be this sercretive about a little old fpsc project but im so close to a workable public beta now that I dont want anyone beating me to the punch.

Everyone ive discussed the project with has reacted in the same way, saying something along the lines of "i cant believe no one has done that already" so I want to keep my cards close to my chest for the time being.

It focus's on what it means to 'be a videogame' and attempts to toss out some of the more accepted notions of what it means to be a video game, notably the 'get to the end and be alive when you get there' concept that almost all video games can be distilled down to.

Somewhere between surgeon simulator and the stanley parable was the initial concept. A light hearted easily accessible experience that had a deeper meaning and message should the player choose to go looking for it.

Pretty soon the beta should be ready and I'll toss it into the WIP thread provided the concept of a game that features suicide as a recurring theme isnt too tasteless for the community, I dont want to offend anyone

Thanks for the comments and hopefully Ive raised your curiosity levels to a point where when I have a beta available you may consider testing it if for no other reason than just to see what im being so secretive about

Im aware that yourself, plystire, flatlander, seth black, s4 etc etc are respected members of the community and its nice to have such a frank and open discussion with such a person

smoke em if you got em
xplosys
13
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Nov 2014 18:51
Well, you got me interested so I'll be watching for the release. I'm always looking for odd and different ways to use this engine and to get it out-of-the-box. I think that run-and-gun is dead.

Quote: "Im aware that yourself, plystire, flatlander, seth black, s4 etc etc are respected members of the community"

I don't think I deserve to be in such great company, but thanks.

Good luck,
Brian.

ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Nov 2014 21:31
You got me interested as well. Wondering what this could
be about. Will be watching.

best of luck

My games never have bugs. They just develop random features..

Login to post a reply

Server time is: 2019-09-20 07:34:23
Your offset time is: 2019-09-20 07:34:23