Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Modify SD Bombs

  1. #21
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    It's aslo nice, but it should look better with suitcase (we dont need the anim) because this tnt match to standard cod2 mod ( 2nd war times) .But that is only my opinion . good luck
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  2. #22
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    I ported the bomb model from COD:World at War:



    It also serves for my port of Sabotage gametype.

  3. The Following 2 Users Say Thank You to Tally For This Useful Post:

    kung foo man (17th October 2013),Loveboy (17th October 2013)

  4. #23
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Ok, there is a problem with my original code - it doesn't account for the existence of more than 1 model at a bombzone. It will just spam the map with multiple models like this:





    Also, there is a very bad error on mp_farmhouse - it deletes the whole Silo objective, and leaves a great big hole in the ground which you can fall through. The following code fixes all these problems:

    PHP Code:
    setupSolidSilo()
    {
        
    bombzones getentarray"bombzone""targetname" );
        for( 
    0bombzones.sizei++ )
        {
            
    bombzone bombzones[i];

            if( 
    isdefinedbombzone.script_label ) )
            {
                if( 
    bombzone.script_label == "B" || bombzone.script_label == "b" )
                 {
                    
    solid spawn"trigger_radius"bombzone.origin+(80,30,-10), 020070 );
                    
    solid setContents);

                    
    solid spawn"trigger_radius"bombzone.origin+(-80,30,-10), 020070 );
                    
    solid setContents);

                    
    solid spawn"trigger_radius"bombzone.origin+(0,-80,-10), 020070 );
                    
    solid setContents);

                    
    solid spawn"trigger_radius"bombzone.origin+(0,80,-10), 020070 );
                    
    solid setContents);
                 }
            }
        }
    }

    deleteModel()
    {
        
    entitytypes getentarray();
        for( 
    0entitytypes.sizei++ )
        {
            if( 
    entitytypes[i].classname == "script_model" )
            {
                if( 
    entitytypes[i].model == "xmodel/static_mp_supplies" )
                {
                    
    replaceDestroyed spawn"script_model"entitytypes[i].origin );
                    
    replaceDestroyed setModel"xmodel/static_mp_supplies_x" );
                    
                    
    entitytypes[iplaysound"flak88_explode" );
                    
    entitytypes[idelete();
                }
            }
        }
    }

    replaceModels()
    {
        
    level.saved_origin = [];
        
    level.saved_modelType = [];
        
        
    // delete existing bombzone models
        
    entitytypes getentarray();
        for( 
    0entitytypes.sizei++ )
        {
            if( 
    isdefinedentitytypes[i].script_gameobjectname ) )
            {
                
    gameobjectnames strtokentitytypes[i].script_gameobjectname" " );
                
                for( 
    0gameobjectnames.sizek++ )
                {
                    if( 
    gameobjectnames[k] == "bombzone" )
                    {    
                        if( 
    entitytypes[i].classname == "script_model" )
                        {
                            
    level.saved_origin[level.saved_origin.size] = entitytypes[i].origin;
                            
    entitytypes[idelete();
                        }
                    }
                }

            }
        }
        
        
    // delete bombzone clips
        
    entitytypes getentarray();
        for( 
    0entitytypes.sizei++ )
        {
            if( 
    isdefinedentitytypes[i].script_gameobjectname ) )
            {
                
    gameobjectnames strtokentitytypes[i].script_gameobjectname" " );
                
                for( 
    0gameobjectnames.sizek++ )
                {
                    if( 
    gameobjectnames[k] == "bombzone" )
                    {    
                        if( 
    entitytypes[i].classname == "script_brushmodel" )
                        {
                            if( 
    level.script == "mp_farmhouse" )
                            {
                                
    entitytypes[inotSolid();
                                
    thread setupSolidSilo();
                            }
                            else 
                                
    entitytypes[idelete();
                        }
                    }
                }

            }
        }

        
    // spawn World at War bombzone model at target point A and make solid
        
    spawnpoint FindGroundlevel.saved_origin[0] );
        
    replace spawn"script_model"spawnpoint );
        
    replace setModel"xmodel/static_mp_supplies" );
        
    replace.angles = (-90,0,0);
        
    solid spawn"trigger_radius"spawnpoint05080 );
        
    solid setContents);
        
        
    bombzones getentarray"bombzone""targetname" );
        for( 
    0bombzones.sizei++ )
        {
            
    bombzone bombzones[i];
            if( 
    isdefinedbombzone.script_label ) )
                if( 
    bombzone.script_label == "A" || bombzone.script_label == "a" )
                    
    bombzone.origin replace.origin+(0,0,55);
        }
        
        
    level.saved_origin remove_element_from_arraylevel.saved_originlevel.saved_origin[0] );

        
    // spawn World at War bombzone model at target point B and make solid
        
    if( level.script == "mp_farmhouse" )
        {
            
    bombzones getentarray"bombzone""targetname" );
            for( 
    0bombzones.sizei++ )
            {
                
    bombzone bombzones[i];
                if( 
    isdefinedbombzone.script_label ) )
                {
                    if( 
    bombzone.script_label == "B" || bombzone.script_label == "b" )
                    {    
                        
    replace spawn"script_model", (-2556950, -45) );
                        
    replace setModel"xmodel/static_mp_supplies" );
                        
    replace.angles = (-90,0,0);
                        
    solid spawn"trigger_radius"replace.origin05080 );
                        
    solid setContents);
                        
    bombzone.origin replace.origin+(0,0,55);    
                    }
                }
            }
        }
        else
        {
            
    spawnpoint level.saved_originrandomintlevel.saved_origin.size ) ];
            
    spawn FindGroundspawnpoint );
            
    replace spawn"script_model"spawn );
            
    replace setModel"xmodel/static_mp_supplies" );
            
    replace.angles = (-90,0,0);
            
    solid spawn"trigger_radius"spawn05070 );
            
    solid setContents);
            
            
    bombzones getentarray"bombzone""targetname" );
            for( 
    0bombzones.sizei++ )
            {
                
    bombzone bombzones[i];
                if( 
    isdefinedbombzone.script_label ) )
                    if( 
    bombzone.script_label == "B" || bombzone.script_label == "b" )
                        
    bombzone.origin replace.origin+(0,0,55);
            }
        }
    }

    FindGroundposition )
    {
        
    trace bulletTraceposition+(0,0,10), position+(0,0,-10000), falseundefined );
        
    ground trace["position"];
        return 
    ground;
    }

    remove_element_from_array( array, element )
    {
        if( !
    isdefinedelement ) )
            return( array );
            
        
    newarray = [];
        for( 
    0< array.sizei++ )
        {
            if( array[ 
    ] == element )
                continue;
                
            
    newarraynewarray.size ] = array[ ];
        }
        
        return( 
    newarray );


  5. The Following User Says Thank You to Tally For This Useful Post:

    Loveboy (17th October 2013)

  6. #24
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    Nice models Tally!

    And now to RobsoN, it's from MW2 (The suitcase what you wanted )

    If someone want these models, just ask and I will upload!

    Click image for larger version. 

Name:	suitcase.jpg 
Views:	64 
Size:	277.4 KB 
ID:	484

  7. #25
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    Now it looks a much better
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  8. #26
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    But without anim's of writing the code looks gay xD I will try to make that anim!

  9. #27
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    hmm I forget to delete the model if the bomb explode xD So if it explode, the bomb is still there, how did you made it Tally to delete the model if it is exploding?

  10. #28
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Loveboy View Post
    hmm I forget to delete the model if the bomb explode xD So if it explode, the bomb is still there, how did you made it Tally to delete the model if it is exploding?
    It is in the download file I posted. DOH!

  11. #29
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    ah ok, i just forgot to change something
    Last edited by Loveboy; 18th October 2013 at 19:17.

  12. #30
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    In the file I posted, search for the word "TALLY".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •