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 Checkpoint Script - A Different Approach

Author
Message
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Mar 2018 00:58 Edited at: 4th Mar 2018 17:26
For those of you having "check point" problems when building or testing "very large or layered" levels,
this maybe a solution for you. I was having checkpoint problems when using them several layers high, or
when placed over another checkpoint ( like in a two-story building ) the player would pass through a "lower level"
checkpoint, but the one above it would also get triggered without the player ever passing the point
They are hard-coded markers so it's a little hard to trick them I had seen something similar in the past and worked out a script to solve this problem.
Place this script (triggerzone) where the player would pass instead of a Checkpoint Marker, place a Dynamic Entity ( very simple "small" object, heck it can be invisible )
Name the entity same name as in script "plrmoveto=Name Of Entity 1 or 0" the "1" sets to keep players rotation/ a "0" resets player to zero degrees when (plrmoveto=abox 1 or plrmoveto=abox 0)
Just remember to give entity the same name as in script, any unique name will do.


When the player dies now, if he has passed through this triggerzone, he will try to re-spawn at a normal "Checkpoint"
but the script will "force" the player to move to the Entity.

Note: play with the timer, I have noticed anything less than one second and it gets a little weird, the engine it seems need to
do a "normal" re-spawn and then the script kicks in and moves player. If more than two seconds one can clearly
see the jump/move....
@ seppgirty...this will help so you wont have to run up those five floors of stairs

Here is an updated script if you need to use additional "Check Points" after this, you can setup to have
this script destroy itself...or as in my case I'm using several of these " plrmoveto" scripts and each subsequent one
destroys the prior one. Just put the name of the prior triggerzone into the ifused field of the next one.
My games never have bugs. They just develop random features..
Lots and lots of random features...

Attachments

Login to view attachments
seppgirty
FPSC Developer
15
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 4th Mar 2018 17:27
Quote: "@ seppgirty...this will help so you wont have to run up those five floors of stairs "


God bless you Mike. This is a really good idea.
gamer, lover, filmmaker
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Mar 2018 23:02
@ seppgirty Thanks maybe you can put it to use ?

I do want to reiterate that this DOES NOT replace a standard "Check Point Marker".
This is only a work-around when problems arise Every situation is different.
My games never have bugs. They just develop random features..
Lots and lots of random features...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 20th Mar 2018 23:00
Just an update to the previous script. I wanted to get rid of the annoying and obvious "player being moved"
that one could see happening. So I came up with a solution, use a "black" hud while this happens.

Just make a totally "black" hud ( I used a .png, works fine ) set path to your image in the script above.
Now after this is triggered and player dies, the hud appears (black) after player is re-spawned and moved
the hud fades out. Works perfectly each time Any problems just ask.
Note: Again, this is not a replacement for the standard "Player Check Point" just a work around
when problems arise or for special needs what ever that might be
My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2024-11-23 09:33:23
Your offset time is: 2024-11-23 09:33:23