Modme Forums

Round trigger door/debris

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


ModmeBot:

Thread By: noVADex
wanting to have a door/debris open after a certain number of rounds pass. Can anyone point me to a tutorial or anything useful.............many thank yous


ModmeBot:

Reply By: TrueGamerCalls

noVADex
wanting to have a door/debris open after a certain number of rounds pass. Can anyone point me to a tutorial or anything useful.............many thank yous

I won't get into anything else but the round things
I got this from Abnormal btw
if(level.round_number == #)
Use this as a "flag" I guess you could say, just pointing you towards the right direction.


ModmeBot:

Reply By: KillJoyYT
very interested! let me know if you figure anything out


ModmeBot:

Reply By: billdavison
I whipped something quickly I tested it it works, in the comments I tried explaning it the best I could but it works and there are things that need to be modified so your door moves where you want it but remember to thread setting_up_the_door(); in your main function I hopped this helped

// make sure you thread setting_up_the_door(); in the main function in your mapname.gsc

// this is for somthing
function  setting_up_the_door()
{

 
//fyi the word level used in scripts means i can use that variable in any functions fyi
//this is setting the targetname of the trigger_use in radiant as door_trig
 level.door_trig = GetEnt("door_trig", "targetname");
 level.door_trig SetCursorHint("HINT_NOICON");
 level.door_trig UseTriggerRequireLookAt();
 level.door_trig SetHintString("this door will open after round 3"); //type what ever your heart desires anything around these lines or this door will magically open lol i dk/ this is what the door says
// now you need to set up the script_model's targetname  to door_model1 in radiant

 level.door_model1 = GetEnt("door_model1", "targetname");
 level.door_model1 SetCursorHint("HINT_NOICON");
 level.door_model1 UseTriggerRequireLookAt();
 
 // this sets up a second door,now you need to set up a second  script_model's targetname  to door_model2 in radiant
 
 level.door_model2 = GetEnt("door_model2", "targetname");
 level.door_model2 SetCursorHint("HINT_NOICON");
 level.door_model2 UseTriggerRequireLookAt();





while(1)
 {

if (level.round_number == 3)
   {

	thread openthedoors();
	break;
	wait (.01);
   }
    wait(.01);

 }



}


function openthedoors() 

{
 level.door_trig Delete();
 level.door_model1 MoveY(-100,6); // change the x to  y or z if you want the door to move in a different direction , do some playing around to figure out where you want to move your doors to move
 level.door_model2 MoveY(56,6);
 
}


ModmeBot:

Reply By: Harry Bo21
when deleting a barrier you need to use


entity connectPaths();


on it first before deleting it or zombies will not path ( also tick dynamic paths of the entity in the kvps in radiant )

also if it leads into another zone, you also need to set the flag for that zone so it activates


also, the shortest possible wait in gsc is 0.05 not 0.01 ( 0.01 is the shortest possible wait in csc however )


ModmeBot:

Reply By: KillJoyYT
this is awesome dude thank you


ModmeBot:

Reply By: noVADex
Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush.
Cheers


ModmeBot:

Reply By: noVADex

function rd_door()
{
level flag::wait_till( "all_players_connected" );
door_1= GetEnt("clip_round_down1", "targetname");
door_2= GetEnt("clip_round_down2", "targetname");
door_trig = GetEnt("door_trig", "targetname");
door_trig SetCursorHint("HINT_NOICON");
door_trig UseTriggerRequireLookAt();
door_trig SetHintString("Doors locked till round 16");
 
while(1)
{
self waittill( "end_of_round" );
 
if(level.round_number >= 15){
door_1 MoveZ(-173,3);
door_2 moveZ(-173,3);
wait 0.5;
door_1 Delete();
door_2 Delete();
door_trig Delete();
break;;
    }
wait 0.01;
}
}


ModmeBot:

Reply By: Harry Bo21

noVADex
Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers

they will not go through the door....

spawn on the zone on the other side - yes

walk through it - no


ModmeBot:

Reply By: noVADex

Harry Bo21
noVADex Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers they will not go through the door.... spawn on the zone on the other side - yes walk through it - no

yes indeed they do walk through it, both ways infact, from either zone. I wouldn't of posted anything till I had it tested and working.
My only concern at this point is having the zone past the door not trigger if the player dosnt walk up to the area the door was. so as to trigger the trig behind the deleted door, but the kvp script_flag on the original door and trigger dont take effect, unless you have a suggestion for that.


ModmeBot:

Reply By: Harry Bo21

noVADex
Harry Bo21 noVADex Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers they will not go through the door.... spawn on the zone on the other side - yes walk through it - no yes indeed they do walk through it, both ways infact, from either zone. I wouldn't of posted anything till I had it tested and working. My only concern at this point is having the zone past the door not trigger if the player dosnt walk up to the area the door was. so as to trigger the trig behind the deleted door, but the kvp script_flag on the original door and trigger dont take effect, unless you have a suggestion for that.

...

connect paths is required... has always been required... and will always be required

rather than argue why not type the "one" line of code im telling you...

and for the flag to work, you need to "use" that kvp in script and "activate" the flag with it

setting the kvp - is only registering the "name" in a way you can "find" it in script


ModmeBot:

Reply By: noVADex

Harry Bo21
noVADex Harry Bo21 noVADex Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers they will not go through the door.... spawn on the zone on the other side - yes walk through it - no yes indeed they do walk through it, both ways infact, from either zone. I wouldn't of posted anything till I had it tested and working. My only concern at this point is having the zone past the door not trigger if the player dosnt walk up to the area the door was. so as to trigger the trig behind the deleted door, but the kvp script_flag on the original door and trigger dont take effect, unless you have a suggestion for that. ... connect paths is required... has always been required... and will always be required rather than argue why not type the "one" line of code im telling you... and for the flag to work, you need to "use" that kvp in script and "activate" the flag with it setting the kvp - is only registering the "name" in a way you can "find" it in script

Im not arguing- I came here for help. I am stating facts -the pathing works, so that info isn't helpful at this time. No point adding code that isnt needed, but if i ever come across a situation that requires that line of code ill be sure to come back and collect it when and if its helpful.
As for the activation of a zone through code, I am not sure how to do it. I've always only used the kvp on a trigger. Although i have attempted to use what i know from waw and also what i can figure out from the code ive seen. Yes, it makes it past the linker, but doesn't work in game or causes a error during loading. Knowing that line of code for activating a zone would actually be very helpful, and im sure many wouldn't argue that point.
Thanks again


ModmeBot:

Reply By: Harry Bo21

noVADex
Harry Bo21 noVADex Harry Bo21 noVADex Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers they will not go through the door.... spawn on the zone on the other side - yes walk through it - no yes indeed they do walk through it, both ways infact, from either zone. I wouldn't of posted anything till I had it tested and working. My only concern at this point is having the zone past the door not trigger if the player dosnt walk up to the area the door was. so as to trigger the trig behind the deleted door, but the kvp script_flag on the original door and trigger dont take effect, unless you have a suggestion for that. ... connect paths is required... has always been required... and will always be required rather than argue why not type the "one" line of code im telling you... and for the flag to work, you need to "use" that kvp in script and "activate" the flag with it setting the kvp - is only registering the "name" in a way you can "find" it in script Im not arguing- I came here for help. I am stating facts -the pathing works, so that info isn't helpful at this time. No point adding code that isnt needed, but if i ever come across a situation that requires that line of code ill be sure to come back and collect it when and if its helpful. As for the activation of a zone through code, I am not sure how to do it. I've always only used the kvp on a trigger. Although i have attempted to use what i know from waw and also what i can figure out from the code ive seen. Yes, it makes it past the linker, but doesn't work in game or causes a error during loading. Knowing that line of code for activating a zone would actually be very helpful, and im sure many wouldn't argue that point. Thanks again

as you are refusing to type one line of code - i know matters - despite the fact it will have 0 negative impact if either of us is wrong

i wont help you further with either aspect


ModmeBot:

Reply By: noVADex

Harry Bo21
noVADex Harry Bo21 noVADex Harry Bo21 noVADex Thanks guys this was all very helpful, never had any issues with zombie pathing after deleting the entities, but i did use a multi trigger with touch zone activation on the other side of the clip/brush. Cheers they will not go through the door.... spawn on the zone on the other side - yes walk through it - no yes indeed they do walk through it, both ways infact, from either zone. I wouldn't of posted anything till I had it tested and working. My only concern at this point is having the zone past the door not trigger if the player dosnt walk up to the area the door was. so as to trigger the trig behind the deleted door, but the kvp script_flag on the original door and trigger dont take effect, unless you have a suggestion for that. ... connect paths is required... has always been required... and will always be required rather than argue why not type the "one" line of code im telling you... and for the flag to work, you need to "use" that kvp in script and "activate" the flag with it setting the kvp - is only registering the "name" in a way you can "find" it in script Im not arguing- I came here for help. I am stating facts -the pathing works, so that info isn't helpful at this time. No point adding code that isnt needed, but if i ever come across a situation that requires that line of code ill be sure to come back and collect it when and if its helpful. As for the activation of a zone through code, I am not sure how to do it. I've always only used the kvp on a trigger. Although i have attempted to use what i know from waw and also what i can figure out from the code ive seen. Yes, it makes it past the linker, but doesn't work in game or causes a error during loading. Knowing that line of code for activating a zone would actually be very helpful, and im sure many wouldn't argue that point. Thanks again as you are refusing to type one line of code - i know matters - despite the fact it will have 0 negative impact if either of us is wrong i wont help you further with either aspect

You haven't helped with anything in the first place.The code you offered was useless, cause when i removed it, the zombies still pathed correctly. I am actually testing and using the code, obviously your not. Even the original answer of script from billdavison works and has correct pathing, again i tested it too.You would know this if you tried them. No i did not attempt any zone activation during those original tests.
again i say, thank you for your great effort.


ModmeBot:

Reply By: Harry Bo21
sorry but my 18 years coding experience and 4 years cod coding experience far out weighs your "first attempt"

good day to you sir