UGX-Mods

Call of Duty: Black Ops 3 => Tutorial Desk => Scripting => Topic started by: reckfullies on November 04, 2016, 05:15:26 pm

Title: [Tutorial] Rising Water
Post by: reckfullies on November 04, 2016, 05:15:26 pm
NOTE: This is a somewhat intermediate tutorial, if you don't know how to use radiant pretty well you might find this hard since I won't be explaining basic stuff to you. It will be helpful if you somewhat know how to edit parts of the script since you will be doing that as well as adding stuff to zone and your map.gsc file.

This script can really be used to move anything(model, brush, trigger etc.) but in this tutorial I used it for a rising brush that is textured as water.

Step 1 - Setup Radiant
Spoiler: click to open...
Go into radiant and draw out the brush you want to move.

Then go into the entity browser with the brush selected then go into script/brush and double click it.

Next press N and go into the entity info then change the value for "targetname" to "rising_brush".

Now just position it and save radiant.

Step 2 - Scripting
Spoiler: click to open...
Make a new script called rising_water.gsc and open it.

Paste this code into it and follow the instructions I put as comments:
Spoiler: click to open...
Code Snippet
Plaintext
function init()
{
level thread raise_water();
}

function raise_water()
{
rising_water = GetEnt("rising_brush", "targetname");

original_origin = rising_water.origin;

while(1)
{
//IPrintLn("Water is rising!"); // Remove the comment lines at the beginning of this line to make it announce when the water is rising.
water_barrier MoveTo(water_barrier.origin + (0, 0, 15), 5); // Change 15 to the amount of units you want the water to move up. Change 5 to the amount of time you want it to take to move in seconds.
wait(8); // Change this to the amount of time you want to wait between water rising stages plus the number you changed 5 to. So if you changed 5 to 7 and you wanted to wait 3 seconds between you would make this 10.

if(rising_water.origin == original_origin + (0, 0, 50)) // Change 50 to the amount of units you want it to stop at.
{
break;
}
}
}

Go into root/usermaps/zm_mapname/scripts/zm/zm_mapname.gsc and add this into the #using section:
Code Snippet
Plaintext
#using scripts\rising_water;
then add this to the main function:
Code Snippet
Plaintext
thread rising_water::init();

Finally, enter your zone file and add this:
Code Snippet
Plaintext
scriptparsetree,scripts/rising_water.gsc

I might remake this tutorial with pictures and everything to help people who a clueless about some stuff I'm telling you to do but I'm way too lazy right now.
Title: Re: [Tutorial] Rising Water
Post by: DeletedUser on November 06, 2016, 01:40:35 pm
Could this be used to make a hanged body swing ?
The problem is I think it may work but if we shoot it it won't make it move like the bodies hanged on trees in UGX Azrael.
Title: Re: [Tutorial] Rising Water
Post by: HitmanVere on November 06, 2016, 03:58:35 pm
the bodies hanged on trees in UGX Azrael.

But I didnt add any bodies hanged on trees? wot
Title: Re: [Tutorial] Rising Water
Post by: DeletedUser on November 06, 2016, 04:07:00 pm
Ohh damn I was talking about Zombie Halloween and not UGX Azrael, both of these maps are pretty nice btw ;)
Title: Re: [Tutorial] Rising Water
Post by: reckfullies on November 06, 2016, 04:34:18 pm
Could this be used to make a hanged body swing ?
The problem is I think it may work but if we shoot it it won't make it move like the bodies hanged on trees in UGX Azrael.

I mean you could use a damage trigger then make it move once the trigger is activated. If you want it to look realistic with this method you would probably need to make pretty complicated movements though.

I'm sure there is an easier way to do it that uses physics instead of moving it with your own script.
Title: Re: [Tutorial] Rising Water
Post by: drifter on November 15, 2016, 09:43:06 am
Okay, step 2...
"Go into root/usermaps/zm_mapname/scripts/zm/zm_mapname.gsc and add this into the #using section:
Code: [Select]"

There is nothing in root/usermaps for me... Would this be the same as if I went into mods/mymap/maps/mymapname.gsc?

Keep in mind I used UGX script placer so all the scripts were already generated. Also, at the top on mymap.gsc is #include not #using. 

drifter
Title: Re: [Tutorial] Rising Water
Post by: reckfullies on November 15, 2016, 07:16:43 pm
Okay, step 2...
"Go into root/usermaps/zm_mapname/scripts/zm/zm_mapname.gsc and add this into the #using section:
Code: [Select]"

There is nothing in root/usermaps for me... Would this be the same as if I went into mods/mymap/maps/mymapname.gsc?

Keep in mind I used UGX script placer so all the scripts were already generated. Also, at the top on mymap.gsc is #include not #using. 

drifter

This tutorial is for Black Ops 3 not World At War. You are looking at the wrong section.

Unless for some reason a ugx script placer exists for bo3 which I doubt it.
Title: Re: [Tutorial] Rising Water
Post by: drifter on November 16, 2016, 02:55:04 pm
My bad... thats probably why it didn't work... Thank you
Title: Re: [Tutorial] Rising Water
Post by: Bikini-Bopper420 on March 06, 2022, 08:49:56 pm
How exactly do I make a new script for the function?