CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 3
Call of Duty: Black Ops 3 Mods and Scripts
Call of Duty: Black Ops 3 Scripts
Call of Duty: Black Ops 3 Scripts Question
Call of Duty: Black Ops 3 Answered Questions
How do I spawn triggers with GSC
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="CoD_Modern_Gamer" data-source="post: 21103" data-attributes="member: 26614"><p>[USER=1]@CabCon[/USER] Could you or someone who knows please awnser the unawnsered question from all the way at the top of the thread. <img src="/styles/default/xenforo/smilies.emoji/people/disappointed.emoji.svg" class="smilie" loading="lazy" alt=":disappointed:" title="Disappointed :disappointed:" data-shortname=":disappointed:" /> How do I open specific door(s) that already exists in a map (assuming you need targetname and/or target for this)and how do I make buyable weapons using triggers in gsc. <img src="/styles/default/xenforo/smilies.emoji/people/confused.emoji.svg" class="smilie" loading="lazy" alt=":confused:" title="Confused :confused:" data-shortname=":confused:" /></p><p>The reason I made this topic was because I could not make the trigger work to begin with.</p><p>I tried to do something like this:</p><p>[CODE]function buyableWeapon()</p><p>{</p><p> trig = Spawn("trigger_use", (2300,-5350,180.75)); // This is right outside the first door in SoE for testing.</p><p> trig.targetname = "weapon_upgrade";</p><p> trig.target = "auto2197";</p><p> trig.zombie_weapon_upgrade = "shotgun_pump";</p><p> return trig;</p><p></p><p> weap = Spawn("script_model", (2297.25, -5351, 178.75)); // This is right outside the first door in SoE for testing.</p><p> weap.targetname = "auto2197";</p><p> weap SetModel("wpn_t7_shotgun_spartan_world");</p><p> return weap;</p><p>}</p><p>//Function to open</p><p>function door_think()</p><p>{</p><p> self endon("kill_door_think");</p><p></p><p> // maybe the door the should just bust open instead of slowly opening.</p><p> // maybe just destroy the door, could be two players from opposite sides..</p><p> // breaking into chunks seems best.</p><p> // or I cuold just give it no collision</p><p></p><p> cost = 0;</p><p> </p><p> </p><p> self SetHintLowPriority( true );</p><p></p><p> while( 1 )</p><p> {</p><p> switch( self.script_noteworthy )</p><p> {</p><p> case "local_electric_door":</p><p> self zm_blockers::door_opened(cost,true);</p><p> </p><p> self setHintString("");</p><p></p><p> //Else door can be closed</p><p> wait 3;</p><p> self zm_blockers::waittill_door_can_close();</p><p> self zm_blockers::door_block();</p><p> self zm_blockers::door_opened(cost,true);</p><p> </p><p> wait 3;</p><p> continue;</p><p> </p><p> case "electric_door":</p><p> self zm_blockers::door_opened(cost,true);</p><p> //Else door can be closed</p><p> wait 3;</p><p> self zm_blockers::waittill_door_can_close();</p><p> self zm_blockers::door_block();</p><p> self zm_blockers::door_opened(cost,true);</p><p> wait 3;</p><p> continue;</p><p> //self self_and_flag_wait( "power_on" );</p><p> //self door_opened(cost);</p><p> //return;</p><p></p><p> case "electric_buyable_door":</p><p>// self UseTriggerRequireLookAt();</p><p> break;</p><p></p><p> case "delay_door": // set timer and explode</p><p> self zm_blockers::door_delay();</p><p> break;</p><p></p><p> default:</p><p> self [[level._default_door_custom_logic]]();</p><p> break;</p><p> }</p><p> self zm_blockers::door_opened(cost);</p><p> if(!level flag::get("door_can_close"))</p><p> {</p><p> break;</p><p> } </p><p> }</p><p>}</p><p>function debris_think()</p><p>{</p><p> if( isDefined( level.custom_debris_function ) )</p><p> {</p><p> self [[ level.custom_debris_function ]]();</p><p> } </p><p></p><p> // cut the navmesh</p><p> junk = getentarray( self.target, "targetname" ); </p><p> for( i = 0; i < junk.size; i++ )</p><p> { </p><p> if( isdefined( junk[i].script_noteworthy ) )</p><p> {</p><p> if( junk[i].script_noteworthy == "clip" )</p><p> {</p><p> junk[i] disconnectpaths(); </p><p> }</p><p> }</p><p> }</p><p> </p><p> while( 1 )</p><p> {</p><p> </p><p> self notify( "kill_debris_prompt_thread" );</p><p> </p><p> // Okay remove the debris</p><p> // delete the stuff</p><p> junk = getentarray( self.target, "targetname" ); </p><p></p><p> // Set any flags called</p><p> if( isdefined( self.script_flag ) )</p><p> {</p><p> tokens = Strtok( self.script_flag, "," );</p><p> for ( i=0; i<tokens.size; i++ )</p><p> {</p><p> level flag::set( tokens[i] );</p><p> }</p><p> }</p><p></p><p> zm_utility::play_sound_at_pos( "purchase", self.origin );</p><p> level notify ("junk purchased");</p><p></p><p> move_ent = undefined;</p><p> a_clip = [];</p><p> for( i = 0; i < junk.size; i++ )</p><p> { </p><p> junk[i] connectpaths(); </p><p></p><p> if( isdefined( junk[i].script_noteworthy ) )</p><p> {</p><p> if( junk[i].script_noteworthy == "clip" )</p><p> {</p><p> a_clip[ a_clip.size ] = junk[i];</p><p> continue;</p><p> }</p><p> }</p><p></p><p> struct = undefined;</p><p> if ( junk[i] IsZBarrier() )</p><p> {</p><p> move_ent = junk[i];</p><p> junk[i] thread zm_blockers::debris_zbarrier_move();</p><p> }</p><p> else if( isdefined( junk[i].script_linkTo ) )</p><p> {</p><p> struct = struct::get( junk[i].script_linkTo, "script_linkname" );</p><p> if( isdefined( struct ) )</p><p> {</p><p> move_ent = junk[i];</p><p> junk[i] thread zm_blockers::debris_move( struct );</p><p> }</p><p> else</p><p> {</p><p> junk[i] Delete();</p><p> }</p><p> }</p><p> else if( isdefined( junk[i].target) )</p><p> {</p><p> struct = struct::get( junk[i].target, "targetname" );</p><p> if( isdefined( struct ) )</p><p> {</p><p> move_ent = junk[i];</p><p> junk[i] thread zm_blockers::debris_move( struct );</p><p> }</p><p> else</p><p> {</p><p> junk[i] Delete();</p><p> }</p><p> }</p><p> else</p><p> {</p><p> junk[i] Delete();</p><p> }</p><p> }</p><p> </p><p> // Connect NavVolume traversals</p><p> a_nd_targets = GetNodeArray( self.target, "targetname" );</p><p> foreach( nd_target in a_nd_targets )</p><p> {</p><p> </p><p> LinkTraversal( nd_target );</p><p> </p><p> }</p><p></p><p> // get all trigs, we might want a trigger on both sides</p><p> // of some junk sometimes</p><p> all_trigs = getentarray( self.target, "target" ); </p><p> for( i = 0; i < all_trigs.size; i++ )</p><p> {</p><p> all_trigs[i] delete(); </p><p> }</p><p></p><p> for( i=0; i<a_clip.size; i++ )</p><p> {</p><p> a_clip[i] Delete();</p><p> }</p><p> </p><p> if( isdefined( move_ent ) )</p><p> {</p><p> move_ent waittill( "movedone" );</p><p> }</p><p> </p><p> break;</p><p> }</p><p>}[/CODE]Im about to give up on this. <img src="/styles/default/xenforo/smilies.emoji/people/disappointed.emoji.svg" class="smilie" loading="lazy" alt=":disappointed:" title="Disappointed :disappointed:" data-shortname=":disappointed:" /></p></blockquote><p></p>
[QUOTE="CoD_Modern_Gamer, post: 21103, member: 26614"] [USER=1]@CabCon[/USER] Could you or someone who knows please awnser the unawnsered question from all the way at the top of the thread. :disappointed: How do I open specific door(s) that already exists in a map (assuming you need targetname and/or target for this)and how do I make buyable weapons using triggers in gsc. :confused: The reason I made this topic was because I could not make the trigger work to begin with. I tried to do something like this: [CODE]function buyableWeapon() { trig = Spawn("trigger_use", (2300,-5350,180.75)); // This is right outside the first door in SoE for testing. trig.targetname = "weapon_upgrade"; trig.target = "auto2197"; trig.zombie_weapon_upgrade = "shotgun_pump"; return trig; weap = Spawn("script_model", (2297.25, -5351, 178.75)); // This is right outside the first door in SoE for testing. weap.targetname = "auto2197"; weap SetModel("wpn_t7_shotgun_spartan_world"); return weap; } //Function to open function door_think() { self endon("kill_door_think"); // maybe the door the should just bust open instead of slowly opening. // maybe just destroy the door, could be two players from opposite sides.. // breaking into chunks seems best. // or I cuold just give it no collision cost = 0; self SetHintLowPriority( true ); while( 1 ) { switch( self.script_noteworthy ) { case "local_electric_door": self zm_blockers::door_opened(cost,true); self setHintString(""); //Else door can be closed wait 3; self zm_blockers::waittill_door_can_close(); self zm_blockers::door_block(); self zm_blockers::door_opened(cost,true); wait 3; continue; case "electric_door": self zm_blockers::door_opened(cost,true); //Else door can be closed wait 3; self zm_blockers::waittill_door_can_close(); self zm_blockers::door_block(); self zm_blockers::door_opened(cost,true); wait 3; continue; //self self_and_flag_wait( "power_on" ); //self door_opened(cost); //return; case "electric_buyable_door": // self UseTriggerRequireLookAt(); break; case "delay_door": // set timer and explode self zm_blockers::door_delay(); break; default: self [[level._default_door_custom_logic]](); break; } self zm_blockers::door_opened(cost); if(!level flag::get("door_can_close")) { break; } } } function debris_think() { if( isDefined( level.custom_debris_function ) ) { self [[ level.custom_debris_function ]](); } // cut the navmesh junk = getentarray( self.target, "targetname" ); for( i = 0; i < junk.size; i++ ) { if( isdefined( junk[i].script_noteworthy ) ) { if( junk[i].script_noteworthy == "clip" ) { junk[i] disconnectpaths(); } } } while( 1 ) { self notify( "kill_debris_prompt_thread" ); // Okay remove the debris // delete the stuff junk = getentarray( self.target, "targetname" ); // Set any flags called if( isdefined( self.script_flag ) ) { tokens = Strtok( self.script_flag, "," ); for ( i=0; i<tokens.size; i++ ) { level flag::set( tokens[i] ); } } zm_utility::play_sound_at_pos( "purchase", self.origin ); level notify ("junk purchased"); move_ent = undefined; a_clip = []; for( i = 0; i < junk.size; i++ ) { junk[i] connectpaths(); if( isdefined( junk[i].script_noteworthy ) ) { if( junk[i].script_noteworthy == "clip" ) { a_clip[ a_clip.size ] = junk[i]; continue; } } struct = undefined; if ( junk[i] IsZBarrier() ) { move_ent = junk[i]; junk[i] thread zm_blockers::debris_zbarrier_move(); } else if( isdefined( junk[i].script_linkTo ) ) { struct = struct::get( junk[i].script_linkTo, "script_linkname" ); if( isdefined( struct ) ) { move_ent = junk[i]; junk[i] thread zm_blockers::debris_move( struct ); } else { junk[i] Delete(); } } else if( isdefined( junk[i].target) ) { struct = struct::get( junk[i].target, "targetname" ); if( isdefined( struct ) ) { move_ent = junk[i]; junk[i] thread zm_blockers::debris_move( struct ); } else { junk[i] Delete(); } } else { junk[i] Delete(); } } // Connect NavVolume traversals a_nd_targets = GetNodeArray( self.target, "targetname" ); foreach( nd_target in a_nd_targets ) { LinkTraversal( nd_target ); } // get all trigs, we might want a trigger on both sides // of some junk sometimes all_trigs = getentarray( self.target, "target" ); for( i = 0; i < all_trigs.size; i++ ) { all_trigs[i] delete(); } for( i=0; i<a_clip.size; i++ ) { a_clip[i] Delete(); } if( isdefined( move_ent ) ) { move_ent waittill( "movedone" ); } break; } }[/CODE]Im about to give up on this. :disappointed: [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 3
Call of Duty: Black Ops 3 Mods and Scripts
Call of Duty: Black Ops 3 Scripts
Call of Duty: Black Ops 3 Scripts Question
Call of Duty: Black Ops 3 Answered Questions
How do I spawn triggers with GSC
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top