Modme Forums

“Five” style teleporters.

Game Asset Reversing | Releases


djluvorng:

5 style teleporter template and script

Features stampable prefab and a drag and drop template script.
Zombies follow through the portal and stop following if another player is closer.

Range at which zombies follow is customizable.

2 optional non-random teleporters

Download: https://mega.nz/file/dtchiABA#I5W2pcQdoOySYyzNlGOncdvSsN_p4rtbsPknvvKkVs8

Edit: Now there is a delay before you can jump back into a portal you ended up at.


mrlednor:

ok this is nice so first of all id like to say good job.... now can any one tell me how to make these work with only one tp of this kind in the map and how can i have it so i go to one dest not random when i use more than one ? thanks in advance


djluvorng:

ok this is nice so first of all id like to say good job.... now can any one tell me how to make these work with only one tp of this kind in the map and how can i have it so i go to one dest not random when i use more than one ? thanks in advance

I have updated the script link with the changes requested. Have not tested bc my bo3 is reinstalling... If it does not work let me know.


mrlednor:

thanks for changing the script and adding x2 new pre fabs ....however it still don't work you still need 2 tp pre_fabs for it to work but then it will tp the player to either end point at random

even with the x2 new pre_fabs its the same also with the 2 new tps ("portal_bottom" and portal_top) the fx don't play when u get to the end point ....thanks again I'm halfway in to a map with 4 destinations but would need to tp to each one not random i am using a tp script wit 0 fx and the zombs don't follow with the one I'm using so would really want to use this one

thanks again


mrlednor:

ahh man still not working atall now is there a way i can send u a short vid of it set up and what is happing ?
thanks for your help so far


djluvorng:

ahh man still not working atall now is there a way i can send u a short vid of it set up and what is happing ?
thanks for your help so far

what isn't working? using one teleporter? just use the tele_top prefab and use the tele tele_bottom's script_struct bit only if you only want it one way, or just the top and bottom if you want the player to be able to tele back.


mrlednor:

ok i will try this but if i want to use 6 teleporter's so thats from room 0 to say room one then from room one bk to room 0 and then from room 0 to room 2 and then back to room 0 then from there to room 3 and bk to room 0 again if u use it the way u have sed will it work ? or do i have to define this in the script an dcall them differnt struct like for room 0 to room 1 teleporter_to land on teleport_bottom then id have to have new stuct's like this teleport_top to land on teleport bottom 1 for room 0 to room 2 is that how id do it ?

thanks again for this


djluvorng:

ok i will try this but if i want to use 6 teleporter's so thats from room 0 to say room one then from room one bk to room 0 and then from room 0 to room 2 and then back to room 0 then from there to room 3 and bk to room 0 again if u use it the way u have sed will it work ? or do i have to define this in the script an dcall them differnt struct like for room 0 to room 1 teleporter_to land on teleport_bottom then id have to have new stuct's like this teleport_top to land on teleport bottom 1 for room 0 to room 2 is that how id do it ?

thanks again for this

Please refine yo speech boi...


djluvorng:

If I understand you correctly, you want six teleporters with one in each room. You also want all of the teleporters to be linked to the first room?


mrlednor:

that's correct ill sent u a vid on here in a sec of the set up i have ull understand better then


mrlednor:

If I understand you correctly, you want six teleporters with one in each room. You also want all of the teleporters to be linked to the first room?

here is a vid on youtube of the setup i have it works but i want to use your tps as thay tp zombies and have fx


mrlednor:

If I understand you correctly, you want six teleporters with one in each room. You also want all of the teleporters to be linked to the first room?

ok think i may have it working in the way i need iv changed the script a little an i mean a little

its now
else if(isdefined(self.script_string) && self.script_string == "portal_top1")
{
destination = struct::get("portal_bottom01", "targetname");
user setstance( "stand" );
wait(0.1);
//user playlocalsound( "zmb_black_hole_bomb_teleporter_go" );
user playlocalsound( "kino_teleport_2d" );
user DisableWeapons();
user DisableOffhandWeapons();
user freezecontrols( true );
// trying to force angles on player.
user SetOrigin( destination.origin );
user SetPlayerAngles( destination.angles );
PlayFX( TELE_BEAM, user.origin);
}
else if(isdefined(self.script_string) && self.script_string == "portal_top")
{
destination = struct::get("portal_bottom", "targetname");
user setstance( "stand" );
wait(0.1);
//user playlocalsound( "zmb_black_hole_bomb_teleporter_go" );
user playlocalsound( "kino_teleport_2d" );
user DisableWeapons();
user DisableOffhandWeapons();
user freezecontrols( true );
// trying to force angles on player.
user SetOrigin( destination.origin );
user SetPlayerAngles( destination.angles );
PlayFX( TELE_BEAM, user.origin);
} and then u add the script_sting to the kvp on the trigger to portal_top1 and same for struct is portal_bottom01 an this works with fx aswell
so ill install it in the map and see where it gos i obvs have to script the extra stings and kvp's so i can use more tps

thank you so much for this its helped me loads i will credit you for the tps if it works out in the map thanks again


mrlednor:

ah just place the 1_2, 3_4 etc where you want to end at the 2_1 4_3 etc then place final_dest where you want to go back to spawn:

edit: made it more drag and drop... https://mega.nz/file/Zl0nxQhK#WzUoOXx2ATPaOgd-aT-vFwG8_-axJdk8rIkI1hxcIPY just paste tele_pad as many times as you want and paste tele_back at the secondary locations that go back to spawn. be sure to stamp the prefabs or it wont update the target structs. oh and you can move the structs around to where you want to tele to.

thanks for helping me out i finaly understand scripting a bit better now also thank you ....i dont know if u know u mite want to add the playfx line to the script for others to use this also as it didnt play fx so i added the lines and its all good


mrlednor:

its working really good only issue i have now is when 2 players tp together we die ovs coz we on same struct i have tried copy and paste one and made 4 with same target name but same thing happens any advice ?


djluvorng:

when you look at where it says "user SetOrigin( player_destination.origin" does it have "* rand" ?


mrlednor:

yes but i had to take out * rand and the line
```
//rand = RandomFloatRange(0.9,1.1); is commented its the only way i can get it to work with out putting me eather out the map or under it is there a diff way to allow the players to not hit each other on destination as yes i can use *rand but i get put in some strange places an the struct is as high in the air as the default model head here is the script as i have it

function teleport_player(user)
{
if(IsDefined(user.teleporting) && user.teleporting == true)
{
return;
}
user.teleporting = true;
self thread teleporting_zombies(user);
PlayFX( TELE_BEAM, self.origin);
self playsound( "kino_beam_fx" );
//rand = RandomFloatRange(0.9,1.1);
if(isdefined(self.target))
{
destination = struct::get(self.target, "targetname");
user setstance( "stand" );
wait(0.1);
//user playlocalsound( "zmb_black_hole_bomb_teleporter_go" );
user DisableWeapons();
user DisableOffhandWeapons();
user freezecontrols( true );
// trying to force angles on player.
user SetOrigin( destination.origin );
user SetPlayerAngles( destination.angles );
PlayFX( TELE_BEAM, user.origin);
user playlocalsound( "kino_teleport_2d" );
}
else
{
// script origin trigger destination targets for player placement.
player_destination = struct::get("final_dest", "targetname");
user setstance( "stand" );
wait(0.1);
user playlocalsound( "kino_teleport_2d" );
user DisableWeapons();
user DisableOffhandWeapons();
user freezecontrols( true );
// trying to force angles on player.
user SetOrigin( player_destination.origin );
user SetPlayerAngles( player_destination.angles );
PlayFX( TELE_BEAM, user.origin);
}
wait(0.5);
user enableweapons();
user enableoffhandweapons();
user FreezeControls( false );
user.teleporting = false;
}

```


djluvorng:

i fixed it lol https://mega.nz/file/48klXQKb#BfxpZnK7A90CiU2EwJo6_-05xJ9stbh9Buupbq9NQaA <-- edited version for mrlendor


mrlednor:

i fixed it lol https://mega.nz/file/48klXQKb#BfxpZnK7A90CiU2EwJo6_-05xJ9stbh9Buupbq9NQaA <-- edited version for mrlendor

thanks but now i cnt use more than one as im useing player_destination = struct::get(self.target, "targetname");

so if its not self will it still find each stuct ?or can i cnage the destination = struct::get_array(tele.target, "targetname");

from telle to self ?

or is there a way to stop player to player collide?


ill give it a go just looked at the pre_fab thanks so much for ur help


mrlednor:

i fixed it lol https://mega.nz/file/48klXQKb#BfxpZnK7A90CiU2EwJo6_-05xJ9stbh9Buupbq9NQaA <-- edited version for mrlendor

thank you so much mate its working A1