UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: vinnyz500 on October 23, 2016, 09:57:24 pm

Title: Sewer transportation system
Post by: vinnyz500 on October 23, 2016, 09:57:24 pm
Does anyone know how treyarch did this? I need something similar to the player follows a path at a high speed they cant control and end up at another location. Thus allowing me to section my map into different sections far away...
Title: Re: Sewer transportation system
Post by: reckfullies on October 23, 2016, 10:31:26 pm
Does anyone know how treyarch did this? I need something similar to the player follows a path at a high speed they cant control and end up at another location. Thus allowing me to section my map into different sections far away...

Use script_origins to make a path then move the player to them I suppose, you can also disable their controls so they don't move.
Title: Re: Sewer transportation system
Post by: fear the melon on October 27, 2016, 02:42:57 am
Use script_origins to make a path then move the player to them I suppose, you can also disable their controls so they don't move.

could you explain this in depth please ?
Title: Re: Sewer transportation system
Post by: reckfullies on October 27, 2016, 02:58:46 am
could you explain this in depth please ?

I don't exactly know how to do it since i've never had to try it but pretty sure you can just make a line using script_origins or script_structs and then make the player move to them. Moving the player would need to be script and you just place the script_origins or structs in radiant.
Title: Re: Sewer transportation system
Post by: shinged on October 27, 2016, 03:27:05 am
You could spawn a script model on the player origin, link the player to the script model, move the script model to the end of the sewer, then unlink/delete the script model. There is prob a better way to do this but i think that is what id do
Title: Re: Sewer transportation system
Post by: reckfullies on October 27, 2016, 03:29:53 am
You could spawn a script model on the player origin, link the player to the script model, move the script model to the end of the sewer, then unlink/delete the script model. There is prob a better way to do this but i think that is what id do
Sounds like a better way to do it, Ive never tried either method so idk which way is better though.
Title: Re: Sewer transportation system
Post by: shinged on October 27, 2016, 04:26:41 pm
Would you want something like this, unfortunately i have no idea how to make the zombies follow through it, but it can help you get to places.
Title: Re: Sewer transportation system
Post by: Dust on October 27, 2016, 04:34:06 pm
Would you want something like this, unfortunately i have no idea how to make the zombies follow through it, but it can help you get to places.
(Content removed from quote.)

You could just have the zombies die off as soon as the player(s) get to the other side. I believe that is what Treyarch did in Gorod Krovi.
Title: Re: Sewer transportation system
Post by: fear the melon on October 27, 2016, 06:49:08 pm
Would you want something like this, unfortunately i have no idea how to make the zombies follow through it, but it can help you get to places.
(Content removed from quote.)


how did you do it !
Title: Re: Sewer transportation system
Post by: shinged on October 27, 2016, 07:04:19 pm

how did you do it !
Code Snippet
Plaintext
function sewer_transport_1()
{
sewer_trig = GetEnt("sewer_trig_1", "targetname");
sewer_origin_start = GetEnt("sewer_origin_start", "targetname");
sewer_origin_one = GetEnt("sewer_origin_1", "targetname");
sewer_origin_two = GetEnt("sewer_origin_2", "targetname");
sewer_origin_three = GetEnt("sewer_origin_3", "targetname");
sewer_origin_four = GetEnt("sewer_origin_4", "targetname");
sewer_origin_five = GetEnt("sewer_origin_5", "targetname");
sewer_origin_end = GetEnt("sewer_ending", "targetname");
while(1)
{
sewer_trig SetHintString("Press and hold &&1 to go for a ride");
sewer_trig waittill("trigger", player);
player SetOrigin( sewer_origin_start.origin);
wait(0.01);
moveable = Spawn( "script_model", player.origin );
player PlayerLinkTo( moveable );
moveable MoveTo( sewer_origin_one.origin, 1, 0.5, 0 );
wait(1);
moveable MoveTo( sewer_origin_two.origin, 1, 0, 0.5);
wait(1);
moveable MoveTo( sewer_origin_three.origin, 1, 0.5, 0);
wait(1);
moveable MoveTo( sewer_origin_four.origin, 1, 0, 0);
wait(1);
moveable MoveTo( sewer_origin_five.origin, 1, 0, 0.5);
wait(1);
player Unlink();
moveable Delete();
wait(0.01);
player SetOrigin( sewer_origin_end.origin );
}
}

Well heres the script i quickly wrote for that, you can prob figure out how it works really easily from the script.
Title: Re: Sewer transportation system
Post by: Harry Bo21 on October 27, 2016, 07:07:40 pm
Should use structs - ents count towards gspawn

In this case - this case being all you need is the origin of locations - structs would be perfect
Title: Re: Sewer transportation system
Post by: fear the melon on October 27, 2016, 07:22:58 pm
Should use structs - ents count towards gspawn

In this case - this case being all you need is the origin of locations - structs would be perfect

so would i just add the target names to script_scructs and put them in a line up in order of the code and then put the code in my map.gsc and add a thread at the top in the main function ?
Title: Re: Sewer transportation system
Post by: Harry Bo21 on October 27, 2016, 09:39:33 pm
Pretty much

That and change the references to "getent" as structs are not "ents"
Title: Re: Sewer transportation system
Post by: fear the melon on October 27, 2016, 10:08:35 pm
Pretty much

That and change the references to "getent" as structs are not "ents"


sorry im a noob and dont understand what you mean, what do i need to do with the getents ?

Double Post Merge: October 27, 2016, 10:09:35 pm
Would you want something like this, unfortunately i have no idea how to make the zombies follow through it, but it can help you get to places.
(Content removed from quote.)

can you show me the radiant view plz ?
Title: Re: Sewer transportation system
Post by: Dust on October 27, 2016, 10:32:32 pm

sorry im a noob and dont understand what you mean, what do i need to do with the getents ?

Double Post Merge: October 27, 2016, 10:09:35 pm
can you show me the radiant view plz ?

He means change all the GetEnts to
Code Snippet
Plaintext
struct = struct::get("something", "targetname");
. Obviously change the "something" parameter, to match the targetnames that you are giving the structs, and change the struct variable to something different each time like struct1 =, struct2 = etc.