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 / Need Script, Teleporting To Multiple Locations

Author
Message
I am Frankie
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: USA
Posted: 2nd Nov 2007 23:46
Here is what my goal is:
There is a player that starts in a room with two teleporters(one in, one out) and some guns along the wall. I want him to walk into the teleporter and go to the first location. There will be a teleporter there. Then he teports back.

Up to that point I could easily do. The problem is I want him to then go in the teleporter and go to location two. How could I do this?

*FRANKIE* (iamFrankie)
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 3rd Nov 2007 01:06 Edited at: 3rd Nov 2007 01:07
name your tele porter sets, eg (A-B) (1-2) and put the opposite teleporter in the "if used"

teleporter----teleporter
name-A--------name-B
if used-B-----if used-A

that should (hopefully) work...

You can tell i'm an old-school gamer, right?
I am Frankie
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: USA
Posted: 3rd Nov 2007 01:19
I don't exactly understand what you mean.
Can you make variables? I have never coded before.

I am looking for a code.

*FRANKIE* (iamFrankie)
protoborg
17
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: Somewhere in this reality
Posted: 3rd Nov 2007 05:02
You would not need to set a variable. You could simply use states. You would make it so that when the player returns to first room, the teleporter would link to a second OUT. This could be accomplished with triggers. I'm not sure how this could be done, but I imagine it is possible.

You know your code sucks when it does what you want before you know what you want.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Nov 2007 09:33
You could always send the player to a room OTHER than the start room, but make it look the exact same.

Sorry, I know I'm usually more helpful when it comes to scripting, but I just haven't been myself lately.


The one and only,
~PlystirE~

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 3rd Nov 2007 20:33 Edited at: 3rd Nov 2007 20:34
If you look at the way the teleport state works, you will see that it detects the players proximity (PLRDISTWITHIN) and if the player is within the required distance, he is moved to the other (IFUSED) teleport. Then the script resets (STATE = 0) and waits for the player to do it again.

Instead of resetting the script, we allow it to progress by changing that last STATE = 0 to STATE = 10.

Now we can continue to send the player to another, or the next, location using the command PLRMOVETO.

Place any dynamic object (a tire, pallet, blood splat, etc) where you want the player to be transported to. Name it accordingly... location_2, location_3, etc.

Then continue to code your script beginning at the line:

:state=10,plrdistwithin=40:plrmoveto=location_2,state=20
:state=20,plrdistwithin=40:plrmoveto=location_3,state=30

etc, etc, etc....

Best.

I'm sorry, my answers are limited. You must ask the right question.

I am Frankie
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: USA
Posted: 4th Nov 2007 05:36
thanks.
ill try that

*FRANKIE* (iamFrankie)

Login to post a reply

Server time is: 2024-11-24 01:40:15
Your offset time is: 2024-11-24 01:40:15