UGX-Mods

Call of Duty: Black Ops 3 => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: MakeCents on September 28, 2016, 08:44:47 pm

Title: Sliding Automatic Doors - ZM
Post by: MakeCents on September 28, 2016, 08:44:47 pm
Auto Sliding Doors


www.mediafire.com

INSTRUCTIONS

 - Add the script to your scripts folder with your usermaps\MAP NAME\scripts\zm\zm_mapname.gsc

 - Add this to the top of you zm_mapname.gsc:
Code Snippet
Plaintext
#using scripts\zm\sliding_door;
- Add this to your main function in your zm_mapname.gsc
Code Snippet
Plaintext
	sliding_door::init(  );
- Add this to your zone file:
Code Snippet
Plaintext
	scriptparsetree,scripts/zm/sliding_door.gsc

 - Add the prefab to your map. (If you stamp it, make sure the trigger use targets the trigger multiple, the multiple targets each door, and each door targets a script_struct, where the door will move to)

 - Compile map and link at the least.

NOTE
Sound setup not included. Script is setup that the trigger multiple will have a script_sound kvp that will be the alias for your sound.


INCLUDES
Two door examples included
 - slide apart
 - quad expand door
Script
Updated 2-11-17 -  supports comma delimited script_flags, both default and mc methods.
Title: Re: Sliding Automatic Doors - ZM
Post by: animallover on September 28, 2016, 09:15:02 pm
Thank you :)
Title: Re: Sliding Automatic Doors - ZM
Post by: Erthrock on September 30, 2016, 03:57:37 pm
I cant find my maps .gsc in shared/raw/scripts? Where is it located? I only see the giants .gsc
Title: Re: Sliding Automatic Doors - ZM
Post by: Dust on September 30, 2016, 05:07:04 pm
I cant find my maps .gsc in shared/raw/scripts? Where is it located? I only see the giants .gsc

Your mapname.gsc is found in, usermaps\MAP NAME\scripts\zm\
Title: Re: Sliding Automatic Doors - ZM
Post by: Chusoplay115 on October 02, 2016, 12:42:35 am
How can i change the cost price? I can't select the trigger to change zombie_cost   :(
Title: Re: Sliding Automatic Doors - ZM
Post by: Erthrock on October 02, 2016, 06:44:13 pm
How can i change the cost price? I can't select the trigger to change zombie_cost   :(
you need to stamp the prefab, then you can edit the cost
Title: Re: Sliding Automatic Doors - ZM
Post by: SponsoredByCloro on October 07, 2016, 02:57:30 pm
So, since I have zoning it's required to stamp the prefab, when I do, what exactly do I need to do to get it working?

This has been breaking my brain, i've tried fixing myself, but can't get it to work.

Edit: Fixed it, turns out the zombie counter I was using broke all the trigger_use's
Title: Re: Sliding Automatic Doors - ZM
Post by: ect0 on March 12, 2017, 12:19:10 am
Could i add a sound to it? It adds more to the realism...
Title: Re: Sliding Automatic Doors - ZM
Post by: MakeCents on March 12, 2017, 01:06:29 am
Could i add a sound to it? It adds more to the realism...

Yes, please review this section of instructions.

NOTE
Sound setup not included. Script is setup that the trigger multiple will have a script_sound kvp that will be the alias for your sound.
Title: Re: Sliding Automatic Doors - ZM
Post by: dextro62 on June 24, 2017, 02:09:06 pm
Hey the doors work great.
I changes the script_sound to my alias and the sound plays when the door opens.  But if i'm on the other side of the map and a zombie walks through the door the sound still plays. So how do i make it so the sound can only be heard when near the door.
Thanks.
Title: Re: Sliding Automatic Doors - ZM
Post by: MakeCents on June 24, 2017, 02:28:56 pm
Hey the doors work great.
I changes the script_sound to my alias and the sound plays when the door opens.  But if i'm on the other side of the map and a zombie walks through the door the sound still plays. So how do i make it so the sound can only be heard when near the door.
Thanks.

It sounds like you set up your alias as a 2d sound. If so, make it a 3d sound and adjust the distance, all in the alias file.
Title: Re: Sliding Automatic Doors - ZM
Post by: dextro62 on June 24, 2017, 04:21:23 pm
It sounds like you set up your alias as a 2d sound. If so, make it a 3d sound and adjust the distance, all in the alias file.
Thanks it's working now. I was also wondering if you could have a different sound play when the door closes than when it opens?
Title: Re: Sliding Automatic Doors - ZM
Post by: MakeCents on June 24, 2017, 08:23:58 pm
Thanks it's working now. I was also wondering if you could have a different sound play when the door closes than when it opens?

You could by changing this:
Code Snippet
Plaintext
	while(1)
{
self waittill("trigger");
if(isdefined(self.script_sound))
{
self PlaySound(self.script_sound);
}
for( i=0;i<doors.size;i++ )
{
time = Distance(doors[i].goto,doors[i].origin)/100;
doors[i] MoveTo(doors[i].goto,time);
}
self TouchingEnts();
if(isdefined(self.script_sound))
{
self PlaySound(self.script_sound);
}
for( i=0;i<doors.size;i++ )
{
time = Distance(doors[i].start,doors[i].origin)/100;
doors[i] MoveTo(doors[i].start,time);
}
}
specifically modifying the second one of these:
Code Snippet
Plaintext
		if(isdefined(self.script_sound))
{
self PlaySound(self.script_sound);
}
by hard coding the sound to play on close or by adding another kvp for it to check instead of script_sound, such as script_string
Title: Re: Sliding Automatic Doors - ZM
Post by: dextro62 on June 24, 2017, 09:56:54 pm
It worked. Thanks for the help, i appreciate it.
Title: Re: Sliding Automatic Doors - ZM
Post by: tymmc on July 23, 2017, 03:52:21 pm
Where can I find my zone folder?