Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Possible to Teleport Player?
A.I. Offline
Member

Posts: 114
Threads: 16
Joined: Feb 2012
Reputation: 2
#1
Possible to Teleport Player?

I was wondering, is it possible to teleport the player for like an intro without using another map?
02-25-2012, 08:27 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Possible to Teleport Player?

TeleportPlayer(" [PlayerStartArea_ name here] ");

When Life No Longer Exists
Full-conversion mod
02-25-2012, 08:29 PM
Website Find
A.I. Offline
Member

Posts: 114
Threads: 16
Joined: Feb 2012
Reputation: 2
#3
RE: Possible to Teleport Player?

Would it be something like AddEntityCollideCallback at the beginning and then in there it would have ("Player", "Teleport" "PlayerCollideArea", true, 1), with void PlayerCollideArea(string &in Parent, string &in Child, int alState) and have the teleportplayer in { }?
(This post was last modified: 02-25-2012, 08:41 PM by A.I..)
02-25-2012, 08:34 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#4
RE: Possible to Teleport Player?



void OnStart()
{
AddEntityCollideCallback("Player", "area name here", "Tele", true, 1);
}

void Tele(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer(" [PlayerStartArea_ name here] ");
}

//play around with area names and you should get it working then =)


When Life No Longer Exists
Full-conversion mod
(This post was last modified: 02-25-2012, 08:41 PM by Unearthlybrutal.)
02-25-2012, 08:40 PM
Website Find
A.I. Offline
Member

Posts: 114
Threads: 16
Joined: Feb 2012
Reputation: 2
#5
RE: Possible to Teleport Player?

Ehh one last thing, how would their be delay I have tried putting it like this:


void Tele(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 5.0f, "Timer_1");
TeleportPlayer("CameraPos_2");
}

but never would delay the teleport
02-25-2012, 09:17 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#6
RE: Possible to Teleport Player?

void OnStart()
{
AddEntityCollideCallback("Player", "area name here", "Tele", true, 1);
}

void Tele(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 5.0f, "Timer_1");
}

void Timer_1(string &in asTimer)
{
TeleportPlayer("CameraPos_2");
}


When Life No Longer Exists
Full-conversion mod
(This post was last modified: 02-25-2012, 09:28 PM by Unearthlybrutal.)
02-25-2012, 09:27 PM
Website Find




Users browsing this thread: 1 Guest(s)