Modme Forums

Teleport and Power On Scripts

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Psh
halp, need halp



1. Need a teleport script based off this WAW script I used to use. http://pastebin.com/NaL5F1m3 (Player touches area: Is teleported)



2. How do I have the power on from the start?


ModmeBot:

Reply By: Abnormal202
At first glance your old teleporter script looks good to me, I think you'd just have to put function before your functions to bring it to BO3. so stick this:

entTransporter = getentarray("enter","targetname");  if(isdefined(entTransporter))  {    for(lp=0;lp < entTransporter.size; lp++)      entTransporter[lp] thread Transporter();  }

in your main function, and stick this:

function Transporter(){  while(true)  {    self waittill("trigger",other);    entTarget = getent(self.target, "targetname");     wait(0.10);    other setorigin(entTarget.origin);    other setplayerangles(entTarget.angles);    //iprintlnbold ("You have been teleported !!!");    wait(0.10);  }}

and I assume you know what to do with the trigger_multiples and such.

If that doesn't work, I do have a script for this in my map, though its not intended for multiple triggers. In mine, you'd stick:

level thread trigger_teleport();

in your Main function, and put this:

function trigger_teleport() { trigger = GetEnt( "teleport_trig", "targetname" ); while(1) { trigger waittill( "trigger", player ); player thread get_out_of_here(); } } function get_out_of_here() { origin = GetEnt( "teleport_origin", "targetname" ); wait(1); // Amount of wait time in seconds, before teleport. can put down to 0.05 but no lower. self SetOrigin( origin.origin ); }

at the bottom of the GSC.

Then put a trigger multiple where you want people to be teleported out, and give it the KVP of Targetname: teleport_trig.

Then put a script_origin where you want them to teleport to, and give it the KVP of Targetname: teleport_origin.


ModmeBot:

Reply By: ZombieKid164
You can have power on from the start by putting

level flag::set("power_on");



Under

function main() {

In your mapname.gsc.



I think thats how you do it


ModmeBot:

Reply By: Psh

Abnormal202At first glance your old teleporter script looks good to me, I think you'd just have to put function before your functions to bring it to BO3. so stick this:

entTransporter = getentarray("enter","targetname");  if(isdefined(entTransporter))  {    for(lp=0;lp < entTransporter.size; lp++)      entTransporter[lp] thread Transporter();  }

in your main function, and stick this:

function Transporter(){  while(true)  {    self waittill("trigger",other);    entTarget = getent(self.target, "targetname");     wait(0.10);    other setorigin(entTarget.origin);    other setplayerangles(entTarget.angles);    //iprintlnbold ("You have been teleported !!!");    wait(0.10);  }}

and I assume you know what to do with the trigger_multiples and such.

If that doesn't work, I do have a script for this in my map, though its not intended for multiple triggers. In mine, you'd stick:

level thread trigger_teleport();

in your Main function, and put this:

function trigger_teleport() { trigger = GetEnt( "teleport_trig", "targetname" ); while(1) { trigger waittill( "trigger", player ); player thread get_out_of_here(); } } function get_out_of_here() { origin = GetEnt( "teleport_origin", "targetname" ); wait(1); // Amount of wait time in seconds, before teleport. can put down to 0.05 but no lower. self SetOrigin( origin.origin ); }

at the bottom of the GSC.

Then put a trigger multiple where you want people to be teleported out, and give it the KVP of Targetname: teleport_trig.

Then put a script_origin where you want them to teleport to, and give it the KVP of Targetname: teleport_origin.


Welp, the power from the start worked, but I can't figure out this stuff :(. Can you change the pastebin script yourself because I'm retarded when it comes to scripting :D


ModmeBot:

Reply By: Abnormal202

Psh
Abnormal202At first glance your old teleporter script looks good to me, I think you'd just have to put function before your functions to bring it to BO3. so stick this:

entTransporter = getentarray("enter","targetname");  if(isdefined(entTransporter))  {    for(lp=0;lp < entTransporter.size; lp++)      entTransporter[lp] thread Transporter();  }

in your main function, and stick this:

function Transporter(){  while(true)  {    self waittill("trigger",other);    entTarget = getent(self.target, "targetname");     wait(0.10);    other setorigin(entTarget.origin);    other setplayerangles(entTarget.angles);    //iprintlnbold ("You have been teleported !!!");    wait(0.10);  }}

and I assume you know what to do with the trigger_multiples and such.

If that doesn't work, I do have a script for this in my map, though its not intended for multiple triggers. In mine, you'd stick:

level thread trigger_teleport();

in your Main function, and put this:

function trigger_teleport() { trigger = GetEnt( "teleport_trig", "targetname" ); while(1) { trigger waittill( "trigger", player ); player thread get_out_of_here(); } } function get_out_of_here() { origin = GetEnt( "teleport_origin", "targetname" ); wait(1); // Amount of wait time in seconds, before teleport. can put down to 0.05 but no lower. self SetOrigin( origin.origin ); }

at the bottom of the GSC.

Then put a trigger multiple where you want people to be teleported out, and give it the KVP of Targetname: teleport_trig.

Then put a script_origin where you want them to teleport to, and give it the KVP of Targetname: teleport_origin.


Welp, the power from the start worked, but I can't figure out this stuff :(. Can you change the pastebin script yourself because I'm retarded when it comes to scripting :D


I don't really understand the script you gave me that well, but I know for sure the one I gave you works, because I'm using it in my map. So try using mine first, and if there's something unclear on what you need to do in Radiant or in scripting just ask and be specific.


ModmeBot:

Reply By: warleo
can you please put in pastebin what i need to put in my mapname.gsc?
also what do i do from there in radiant?