
G_Maverick
Joined: Apr 30, 2012
Half the world has an IQ below 100.
|
Posted: Jun 9, 2012 04:49 PM
Msg. 1 of 5
I was wondering if someone could direct me to a tutorial on how to make teleporters work in a single-player game. I've looked for a such a tutorial on this site, but with no luck, all of them have been multi-player. I believe I have seen single-player teleporters in other maps, so any help at all would be greatly appreciated.
|
|
|

MoooseGuy
Joined: Aug 10, 2008
I Approve This Message.
|
Posted: Jun 9, 2012 05:18 PM
Msg. 2 of 5
Create a trigger volume where you want the sender teleporter to be, then in a script check to see if that player is in the trigger volume. If he is, do a (fade_out 1 1 1 10), teleport the player to a flag that you create at the destination, and then fade in. Have a sound play too. Edited by MoooseGuy on Jun 9, 2012 at 05:19 PM
|
|
|

G_Maverick
Joined: Apr 30, 2012
Half the world has an IQ below 100.
|
Posted: Jun 9, 2012 05:49 PM
Msg. 3 of 5
Thanks Mooseguy, I'm using the object_teleport command to move the player character, but Sapien is saying that "player0" is not a valid object name. What am I doing wrong?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Jun 9, 2012 08:12 PM
Msg. 4 of 5
if you're gonna use player0, you gotta define it first
(script static unit player0 (unit (list_get (players) 0)) )
toss that at the top of your script, you'll be able to write (player0) to refer to the first player now.
|
|
|

G_Maverick
Joined: Apr 30, 2012
Half the world has an IQ below 100.
|
Posted: Jun 9, 2012 08:22 PM
Msg. 5 of 5
Thank you so much, Kirby_422.
|
|
|