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 / Spawn somewhere else when you die

Author
Message
Screaming Head Games
15
Years of Service
User Offline
Joined: 13th Dec 2008
Location: You dont want to know......
Posted: 7th Jan 2009 01:03
hello, im hveing trouble figuring out how to script this: i want to spawn in a different room when i die.

can someone please give me a script to do this?

(i searched but i couldn't find this script)

AAAAAAAAAAAHHHHHHHHHHH!!!!!!!!!!!!!!!!
Apple Slicer
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Oregon, in the rain...
Posted: 7th Jan 2009 02:01
You could use "checkpoints" maybe somehow. I dunno.

I'm a Twisted Fire Starter...
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 7th Jan 2009 02:01 Edited at: 7th Jan 2009 02:03
No, because when you're dead...... you're dead.

You'll have to catch the health before it reaches zero. Place a dynamic entity in the level where you want the player to spawn to, like a rug or sign, etc. Then make a script like this and attach it to some other dynamic entity in the level, like a light.

:state=0,plrhealthless=10:plrmoveto=name_of_dynamic_entity,state=1

Best.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Jan 2009 03:56 Edited at: 7th Jan 2009 04:03
Good idea!

This would allow for very dynamic gameplay and should be elaborated on.
If you added a variable for a flag, then you could have numerous locations to be moved to.
Each value of the flag could represent a different entity, thus making all of the entities a potential spawn location.

Quote: "No, because when you're dead...... you're dead.

You'll have to catch the health before it reaches zero."

An entity at the inital spawn location could run the script for the redirect depending on the variable's value. (plrwithinzone,varequal=x:plrmoveto=x)
That way you don't need to monitor player health at all, because the default spawn location is doing all the work..

Screaming Head Games
15
Years of Service
User Offline
Joined: 13th Dec 2008
Location: You dont want to know......
Posted: 7th Jan 2009 04:56
thanks tht helps alot.

AAAAAAAAAAAHHHHHHHHHHH!!!!!!!!!!!!!!!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Jan 2009 22:14
That'd be the best way to do it, but I'm not sure if Lee has fixed the "plrmoveto" bugs. There were a lot of problems with the player getting stuck in walls and whatnot.


The one and only,


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Jan 2009 04:42 Edited at: 8th Jan 2009 05:01
Quote: "There were a lot of problems with the player getting stuck in walls and whatnot."

Well, I guess we will have to place those spawn entities near the middle of the rooms then, and away from any walls.
If memory serves, I used blood-splats (some invisible) in the past for my teleport targets and I do not remember having any trouble.
The only thing I can remember having to do is rotating them so the player was facing the right direction after the move.
It's been awhile since I played with the plrmoveto but I hadn't thought of applying a variable to it until this thread.
I think I will have to script this and play around with it a little and see how it works.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 10th Jan 2009 13:55
@Ply

I've found that (in your mod) pushing the player south with the rifght velocity stops him getting flung into walls, pretty nifty...

"Give a man a fish, and he'll eat for a day. Give a man a fishing rod, and he'll break it up into firewood...or swap it for a fish."
-Frankie Boyle, on Mock the Week

Login to post a reply

Server time is: 2024-11-24 18:56:53
Your offset time is: 2024-11-24 18:56:53