Results 1 to 4 of 4
  1. #1
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    817
    My Mood
    Amazed

    4D1 carepackage/airdrop spawning.

    Hello MPGH!

    I'm trying to spawn a care package that contains a random killstreak.
    But everytime i spawn one it doesnt contain anything and i cant use it.
    this is my code:

    Code:
    spawnCarePackage()
    {
    	crateType = self maps\mp\killstreaks\_airdrop::getRandomCrateType( "airdrop" );
    	level maps\mp\killstreaks\_airdrop::createAirDropCrate( self.owner, "airdrop", crateType, self getOrigin() + (30, 30, 0) );
    }
    Thanks, Tim.

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Erm, I think you are using a wrong code.

    Go look in some mods released.
    I know that Yamato have made stuff with this, if you search around.
    You can find a code for it.


    Did it for you:

    The Box Code:
    Code:
    StreakBox(pos, angle)
    {
                  box = spawn("script_model", pos);
                  box setModel("com_plasticcase_beige_big");
        box.angles = angle;
        box Solid();
        box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                  level.trigger = spawn( "trigger_radius", pos, 0, 50, 50 );
                  level.trigger.angles = angle;
        level.trigger thread StreakBoxGive(pos, angle,box);
                  wait 0.01;
    }
    
    StreakBoxGive(pos,angle,box)
    {
            self endon("disconnect");
    
            while(1)
            {
                            self waittill( "trigger", player );      
                            if(Distance(pos, Player.origin) <= 50){
                            Player setLowerMessage("activate", "Hold ^3[{+activate}]^7 for a Random Killstreak" );}
                            if(Distance(pos, Player.origin) >50){
                            Player ClearLowerMessage("activate", 1);}
                            if(Distance(pos, Player.origin) <= 75 && player useButtonPressed())
                            {
                                  player ClearLowerMessage("activate", 1);
                                  player playsound( "vending_machine_button_press" );
                                  box thread Effects(box);
                                  player thread Bar();
                                  wait 4.5;
                                  player playsound( "vending_machine_soda_drop" );
              player maps\mp\killstreaks\_killstreaks::giveKillstreak( level.streaks[RandomInt( level.streaks.size )], true );
                                  wait 1;
                            }
                    wait .25;
            }  
    }  
    
    Effects(box)
    {
                 flare = loadfx("misc/flare_ambient_green");
                 fx1 = SpawnFx(flare, box.origin);
                 TriggerFX(fx1);
                 fx2 = SpawnFx(flare, box.origin+(0,0,5));
                 TriggerFX(fx2);
                 wait 5;
                 fx1 delete();
                 fx2 delete();
    }
    
    Bar()
    {
                duration = 4.0;
                bar = createPrimaryProgressBar( 25 );
                barText = createPrimaryProgressBarText( 25 );
                barText setText( "^2Getting Streak" );
                bar updateBar( 0, 1 / duration );
                bar.color = (1, 0, 0);
                for(i=0;i<4;i++)
                {
                    self playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
                }
                wait 3.5;
                bar destroyElem();
                barText destroyElem();
    }
    Add this in the: int() thread
    Code:
    level.streaks = [];
                  level.streaks[0] = "uav";
                  level.streaks[1] = "counter_uav";
                  level.streaks[2] = "helicopter";
                  level.streaks[3] = "ac130";
                  level.streaks[4] = "nuke";
                  level.streaks[5] = "emp";
                  level.streaks[6] = "predator_missile";
                  level.streaks[7] = "helicopter_minigun";
                  level.streaks[8] = "precision_airstrike";
                  level.streaks[9] = "sentry";
                  level.streaks[10] = "helicopter_flares";
                  level.streaks[11] = "stealth_airstrike";
                  level.streaks[12] = "harrier_airstrike";
    Credits: Yamato
    Last edited by Jorndel; 07-10-2012 at 10:35 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. The Following User Says Thank You to Jorndel For This Useful Post:

    Yamato (07-11-2012)

  4. #3
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    817
    My Mood
    Amazed
    Quote Originally Posted by Jorndel View Post
    Erm, I think you are using a wrong code.

    Go look in some mods released.
    I know that Yamato have made stuff with this, if you search around.
    You can find a code for it.

    Did it for you:
    Oh thanks but what i mean was just dropping a crate from helicopter or just spawning in next to you like a regular care package 1 time use etc.
    I tried the code that the dropzone game used but it didnt work.

  5. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Look in the carepack GSC.
    I suppose you can find it there

    Or a Zombie mod, there it comes a drop as well.
    No idea what it was named tho :|
    But it used Bot Zombies.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

Similar Threads

  1. How to may spawn on all bases
    By Naeron in forum WarRock - International Hacks
    Replies: 8
    Last Post: 05-13-2007, 08:44 PM
  2. [Trade]Insta Spawn & Unlim Stamina Adresses for....
    By EndRiT in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-15-2007, 07:57 AM
  3. [request]spawn kill
    By MaskedFox in forum WarRock - International Hacks
    Replies: 9
    Last Post: 03-20-2007, 10:21 PM
  4. Spawn on enemy base
    By analog70 in forum WarRock - International Hacks
    Replies: 36
    Last Post: 03-18-2007, 05:17 AM
  5. [RELEASE] Xauen Sniper Spawn
    By retrac in forum WarRock - International Hacks
    Replies: 4
    Last Post: 02-19-2007, 05:05 PM