ItsMods

Full Version: NO barriers Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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!
playerlogic:
if(eAttacker == victim)
idamage = 0;
I think he means the walls
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_classifyparent_trig )
{
    if ( 
IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" )
    {
        
parent_trig.clip self;
        
parent_trig.script_string "clip";
    }
    else if( !
IsDefinedself.script_string ) )
    {
        if( 
IsDefinedself.script_angles ) )
        {
            
self.script_string "rotate";
        }
        else if( 
IsDefinedself.script_vector ) )
        {
            
self.script_string "move";
        }
    }
    else
    {
        if ( !
IsDefinedself.script_string ) )
        {
            
self.script_string "";
        }

        
// Handle other script_strings here
        
switch( self.script_string )
        {
        case 
"anim":
            
AssertExIsDefinedself.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); 
            
AssertExIsDefinedlevel.scr_animself.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); 
            
AssertExIsDefinedlevel.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;

(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_classifyparent_trig )
{
    if ( 
IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" )
    {
        
parent_trig.clip self;
        
parent_trig.script_string "clip";
    }
    else if( !
IsDefinedself.script_string ) )
    {
        if( 
IsDefinedself.script_angles ) )
        {
            
self.script_string "rotate";
        }
        else if( 
IsDefinedself.script_vector ) )
        {
            
self.script_string "move";
        }
    }
    else
    {
        if ( !
IsDefinedself.script_string ) )
        {
            
self.script_string "";
        }

        
// Handle other script_strings here
        
switch( self.script_string )
        {
        case 
"anim":
            
AssertExIsDefinedself.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); 
            
AssertExIsDefinedlevel.scr_animself.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); 
            
AssertExIsDefinedlevel.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)
(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_classifyparent_trig )
{
    if ( 
IsDefined(self.script_noteworthy) && self.script_noteworthy == "clip" )
    {
        
parent_trig.clip self;
        
parent_trig.script_string "clip";
    }
    else if( !
IsDefinedself.script_string ) )
    {
        if( 
IsDefinedself.script_angles ) )
        {
            
self.script_string "rotate";
        }
        else if( 
IsDefinedself.script_vector ) )
        {
            
self.script_string "move";
        }
    }
    else
    {
        if ( !
IsDefinedself.script_string ) )
        {
            
self.script_string "";
        }

        
// Handle other script_strings here
        
switch( self.script_string )
        {
        case 
"anim":
            
AssertExIsDefinedself.script_animname ), "Blocker_init: You must specify a script_animname for "+self.targetname ); 
            
AssertExIsDefinedlevel.scr_animself.script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+self.script_animname ); 
            
AssertExIsDefinedlevel.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
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.
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;
PHP Code:
main()
{
    
// do not do code prone in this script
    
    
self endon("killanimscript");

    
PrepareForTraverse();
    
    
startnode self getnegotiationstartnode();
    
assertIsDefinedstartnode ) );
    
self OrientMode"face angle"startnode.angles[1] );
    
    
realHeight startnode.traverse_height startnode.origin[2];
    
destination = (realHeight);
    
    
reps 6;
    
offset = ( 00destination 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");


(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();

}
Pages: 1 2