ItsMods
NO barriers Code - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: NO barriers Code (/Thread-NO-barriers-Code.html)

Pages: 1 2


NO barriers Code - superbomb17 - 01-08-2011

hey i know there was a code in MW2 that got rid of the barriers and in black ops there are MUCH MORE barriers than MW2 and i need no barriers for a mod I'm making (mainly no height barrier needed)

Thanks!


RE: NO barriers Code - 4FunPlayin - 01-08-2011

playerlogic:
if(eAttacker == victim)
idamage = 0;


RE: NO barriers Code - AZUMIKKEL - 01-08-2011

I think he means the walls


RE: NO barriers Code - Devilmaster666 - 01-08-2011

You could try to look into the zombie...gsc because when you buy new rooms barriers get removed... Big Grin

Edit:
I found some code... maybe you can do something with it.
PHP Code:
door_classify( parent_trig ) { if ( IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" ) { parent_trig.clip = self; parent_trig.script_string = "clip"; } else if( !IsDefined( self.script_string ) ) { if( IsDefined( self.script_angles ) ) { self.script_string = "rotate"; } else if( IsDefined( self.script_vector ) ) { self.script_string = "move"; } } else { if ( !IsDefined( self.script_string ) ) { self.script_string = ""; } // Handle other script_strings here switch( self.script_string ) { case "anim": AssertEx( IsDefined( self.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); AssertEx( IsDefined( level.scr_anim[ self.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); AssertEx( IsDefined( level.blocker_anim_func ), "Blocker_init: You must define a level.blocker_anim_func" ); break; case "counter_1s": parent_trig.counter_1s = self; return; // this is not a door element case "counter_10s": parent_trig.counter_10s = self; return; // this is not a door element case "counter_100s": parent_trig.counter_100s = self; return; // this is not a door element case "explosives": if ( !IsDefined(parent_trig.explosives) ) { parent_trig.explosives = []; } parent_trig.explosives[parent_trig.explosives.size] = self; return; // this is not a door element } } if ( self.classname == "script_brushmodel" ) { self DisconnectPaths(); } parent_trig.doors[parent_trig.doors.size] = self; }



RE: NO barriers Code - superbomb17 - 01-08-2011

(01-08-2011, 17:02)Devilmaster666 Wrote: You could try to look into the zombie...gsc because when you buy new rooms barriers get removed... Big Grin

Edit:
I found some code... maybe you can do something with it.
PHP Code:
door_classify( parent_trig ) { if ( IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" ) { parent_trig.clip = self; parent_trig.script_string = "clip"; } else if( !IsDefined( self.script_string ) ) { if( IsDefined( self.script_angles ) ) { self.script_string = "rotate"; } else if( IsDefined( self.script_vector ) ) { self.script_string = "move"; } } else { if ( !IsDefined( self.script_string ) ) { self.script_string = ""; } // Handle other script_strings here switch( self.script_string ) { case "anim": AssertEx( IsDefined( self.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); AssertEx( IsDefined( level.scr_anim[ self.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); AssertEx( IsDefined( level.blocker_anim_func ), "Blocker_init: You must define a level.blocker_anim_func" ); break; case "counter_1s": parent_trig.counter_1s = self; return; // this is not a door element case "counter_10s": parent_trig.counter_10s = self; return; // this is not a door element case "counter_100s": parent_trig.counter_100s = self; return; // this is not a door element case "explosives": if ( !IsDefined(parent_trig.explosives) ) { parent_trig.explosives = []; } parent_trig.explosives[parent_trig.explosives.size] = self; return; // this is not a door element } } if ( self.classname == "script_brushmodel" ) { self DisconnectPaths(); } parent_trig.doors[parent_trig.doors.size] = self; }

Thanks! looks good, does it go in _rank.gsc? (sry if this is a noobish Q)


RE: NO barriers Code - Devilmaster666 - 01-08-2011

(01-08-2011, 17:58)superbomb17 Wrote:
(01-08-2011, 17:02)Devilmaster666 Wrote: You could try to look into the zombie...gsc because when you buy new rooms barriers get removed... Big Grin

Edit:
I found some code... maybe you can do something with it.
PHP Code:
door_classify( parent_trig ) { if ( IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" ) { parent_trig.clip = self; parent_trig.script_string = "clip"; } else if( !IsDefined( self.script_string ) ) { if( IsDefined( self.script_angles ) ) { self.script_string = "rotate"; } else if( IsDefined( self.script_vector ) ) { self.script_string = "move"; } } else { if ( !IsDefined( self.script_string ) ) { self.script_string = ""; } // Handle other script_strings here switch( self.script_string ) { case "anim": AssertEx( IsDefined( self.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); AssertEx( IsDefined( level.scr_anim[ self.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); AssertEx( IsDefined( level.blocker_anim_func ), "Blocker_init: You must define a level.blocker_anim_func" ); break; case "counter_1s": parent_trig.counter_1s = self; return; // this is not a door element case "counter_10s": parent_trig.counter_10s = self; return; // this is not a door element case "counter_100s": parent_trig.counter_100s = self; return; // this is not a door element case "explosives": if ( !IsDefined(parent_trig.explosives) ) { parent_trig.explosives = []; } parent_trig.explosives[parent_trig.explosives.size] = self; return; // this is not a door element } } if ( self.classname == "script_brushmodel" ) { self DisconnectPaths(); } parent_trig.doors[parent_trig.doors.size] = self; }

Thanks! looks good, does it go in _rank.gsc? (sry if this is a noobish Q)
If you just copy n paste this into the rank gsc you will get an error i think... I just posted it to help you Big Grin



RE: NO barriers Code - DDieter - 01-08-2011

Is there a code so i wont die if i go out of the map? It's to use it in a mod...
I already tried to use this:
Code:
playerlogic: if(eAttacker == victim) idamage = 0;
But then i get an error.


RE: NO barriers Code - 4FunPlayin - 01-08-2011

keyword: damage ctrl+f playerlogic u need a translator to translate me
sry
keyword
damage
playerlogic
gsc file
ctrl+f
---
if(eAttacker == victim)
idamage = 0;


RE: NO barriers Code - d0h! - 01-08-2011

PHP Code:
main() { // do not do code prone in this script self endon("killanimscript"); PrepareForTraverse(); startnode = self getnegotiationstartnode(); assert( IsDefined( startnode ) ); self OrientMode( "face angle", startnode.angles[1] ); realHeight = startnode.traverse_height - startnode.origin[2]; destination = (realHeight); reps = 6; offset = ( 0, 0, destination / reps); self traverseMode("noclip"); // So he doesn't get stuck if the wall is a little too high for (i=0;i<reps;i++) { self Teleport (self.origin + offset); wait (0.05); } self traverseMode("gravity"); }



RE: NO barriers Code - met94 - 01-08-2011

(01-08-2011, 19:57)DDieter Wrote: Is there a code so i wont die if i go out of the map? It's to use it in a mod...
I already tried to use this:
Code:
playerlogic: if(eAttacker == victim) idamage = 0;
But then i get an error.

(01-08-2011, 19:57)b0mber21 Wrote: ents = getEntArray();
for ( index = 0; index < ents.size; index++ )
{
if(isSubStr(ents[index].classname, "trigger_hurt"))
ents[index] delete();

}