Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
cyber-menace

Teleporting the player in an intro script.

Recommended Posts

Why won't this work?

script 8 OPEN		// Intro Script
{
setplayerproperty (1, 1, prop_totallyfrozen);
ChangeCamera (14, 1, 0);
Delay (1*35);
ambientsound ("RECHARGE", 127);
Delay (4*35);
TeleportOther (11, 12, 1);
Delay (2*35);
Thing_Activate (11);
Delay (3*35);
Thing_DeActivate (11);
printbold (s:"\cDThis is it. I'm finally here!");
Delay (3*35);
printbold (s:"\cDTime to show the badboys in hell who's boss!");
Delay (3*35);
Thing_Remove (11);
Delay (2);
TeleportOther (900, 15, 1);
ChangeCamera (0, 1, 0);
Thing_Activate (10);
setplayerproperty (1, 0, prop_totallyfrozen);
}

script 9 OPEN
{
thing_changetid (1155, 900);
}
The player won't teleport from his starting point with this script. Any suggestions?

Share this post


Link to post
LogicDeLuxe said:

Did you use Thing_ChangeTID somewhere to give the player a TID? It best is done in an enter script.

cyber-menace said:

script 9 OPEN
{
thing_changetid (1155, 900);
}



Try changing either one of the OPEN's to an ENTER. I forget what is done first, but sometimes that has an effect on the scripts.

or change the first script into a void type and have the changetid script activate the first script.

Share this post


Link to post

Ops... I forgot I used enter the last time I did something like this too. I'll go try that.

EDIT: Horray for the ZDoom WIKI. I thought I was using Thing_ChangeTID correctly, but what you said Korn about the player having a TID of 1150 before 900 brought me to my senses, and also made me realize there's a huge script problem in my MAP19 right now. I changed the script concerning the player's TID to

script 9 enter
{
thing_changetid (0, 900+PlayerNumber());
}
and it works just fine. I also learned how to use TeleportOther 100% by looking it up. My player was teleporting backward, I realized this was a problem and tried to script my way out of it, but the only solution was to just turn him around. Thank you for you help.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×