Results 1 to 4 of 4

Thread: COD: AW boostjumping

  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts

    COD: AW boostjumping

    Here you go:
    PHP Code:
    init()
    {
        
    thread waitforconnect();
    }

    waitforconnect()
    {
        while(
    true)
        {
            
    level waittill("connecting"player);
            
    player thread waitforspawn();
        }
    }

    waitforspawn()
    {
        
    self endon("disconnect");
        while(
    true)
        {
            
    self waittill("spawned_player");
            
    self thread onspawn();
        }
    }

    onspawn()
    {
        
    self endon("spawned_player");
        
    self endon("disconnect");
        
    wasonground false;
        
    wasjumpbuttonpressed false;
        
    boost_frames 0;
        while(
    true)
        {
            
    onground self isonground();
            if(
    onground)
                
    boost_frames 0;
            if(
    boost_frames 1)
            {
                
    boost_frames--;
                
    speed self getvelocity();
                
    speed_2d = (speed[0], speed[1], 0);
                if(
    length(speed_2d) > getcvarint("g_speed") * 0.75)
                    
    speed_2d maps\mp\_utility::vectorscale(vectornormalize(speed_2d), getcvarint("g_speed") * 0.75);
                
    maxspeed getcvarint("g_boost_speed");
                if(
    maxspeed <= 0)
                    
    maxspeed 100;
                
    curspeed speed[2];
                
    boost_percentage = (maxspeed curspeed) / maxspeed;
                if(
    boost_percentage 0)
                    
    boost_percentage 0;
                if(
    boost_percentage 1)
                    
    boost_percentage *= 0.9;
                
    newspeed curspeed boost_percentage getcvarint("g_boost_power");
                
    self setvelocity((speed_2d[0], speed_2d[1], newspeed));
            }
            if(!
    onground && !wasonground && !boost_frames && self jumpbuttonpressed() && !wasjumpbuttonpressed)
                    
    boost_frames getcvarint("g_boost_frames");
            
    wasjumpbuttonpressed self jumpbuttonpressed() || wasonground;
            
    wasonground onground;
            
    wait 0.05;
        }

    Video will be added later, as I'm on a train at the moment.

    Cvar values that work well:
    g_boost_speed 300
    g_boost_power 300
    g_boost_frames 7

    It's a lot of fun to play this on toujane. Remember to disable killtriggers if you dont wanna die every second
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

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

    kung foo man (7th November 2014),MeGaBooM (10th November 2014),Ni3ls (8th November 2014)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    I can confirm the fun.

    Would be nice to have maps with more levels though. All maps are mostly "ground only", where this boostjump ability doesn't really comes to business.
    timescale 0.01

  4. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    yup, cod: aw singleplayer mostly used boostjumping in maps with parked cars/busses. Was quite useful to boostjump there, but stock cod2 maps are (obviously) not well-equiped to handle boostjumping.

    The nice thing is, however, that this script works independently from any mod, and thus can be incorporated in your custom map
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    `Now add side dashes as well ^^

Posting Permissions

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