• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a harrier crash into the map?
#1
How would I make a harrier spawn and crash into the map? Assuming I already set (location) as the spot i want it to via the kill streak map selector.

How like I make multiples spawn and randomly hit near that area?
  Reply
#2
You can find random spots for the harrier around the area like this:

Code:
HeavyArtillery = BulletTrace( location, ( location + ( 0, 0, -100000 ) + (RandomIntRange(-1000,1000),RandomIntRange(-1000,1000),0) ), 0, self )[ "position" ];

I am following the example of this code that is what you might have:

http://www.itsmods.com/forum/Thread-Harrier.html
  Reply
#3
Very nice. I tried out your code you posted in the other thread. Works well. I'm still trying to wrap my mind around how I would get these to spawn in say, an artillery barrage (From custom killstreaks mod). Here's the code from the barrage itself :

Code:
HeavyArtillery = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
        self.selectingLocation = undefined;
        wait 0.01;

    HeavyArtillery2 = HeavyArtillery+(0, 0, 8000);
        MagicBullet( "ac130_105mm_mp", HeavyArtillery2, HeavyArtillery2-(0, 0, 8000), self );
        wait 0.75;
      
        HeavyArtillery2 = HeavyArtillery+(-2000, 1500, 8000);
        MagicBullet( "ac130_105mm_mp", HeavyArtillery2, HeavyArtillery2-(0, 0, 8000), self );
        wait 0.75;

Obviously the there's many more magic bullets that spawn, but this is what it looks like.

Where / how would I change one of these lines so that it spawns a jet flying down at the map from a random angle and random location?

The code above is also assuming I already set "location" with the map selector. (Enabling all this ^ to happen)
  Reply
#4
Using this from the other post:

http://pastebin.com/eua5CZqQ

You would only need to use this to spawn more harriers:

Code:
self thread DeathHarrier(HeavyArtillery2);
self thread DeathHarrier(HeavyArtillery3);

And to make the harriers spawn in random spots just change this line to this (the line its inside DeathHarrier() function:

Code:
Kamikaze = spawn("script_model", self.origin+(RandomIntRange(-24000,24000),RandomIntRange(-15000,15000),25000) );
  Reply
#5
(06-08-2013, 11:22)Yamato Wrote: Using this from the other post:

http://pastebin.com/eua5CZqQ

You would only need to use this to spawn more harriers:

Code:
self thread DeathHarrier(HeavyArtillery2);
self thread DeathHarrier(HeavyArtillery3);

And to make the harriers spawn in random spots just change this line to this (the line its inside DeathHarrier() function:

Code:
Kamikaze = spawn("script_model", self.origin+(RandomIntRange(-24000,24000),RandomIntRange(-15000,15000),25000) );


That works great! The only problem is that the 'angle' of the harrier doesn't match the direction, so it's pointing one direction but flying another. Is there any way to make the random spawn point match the new angle?
  Reply
#6
(06-08-2013, 12:26)akillj Wrote:
(06-08-2013, 11:22)Yamato Wrote: Using this from the other post:

http://pastebin.com/eua5CZqQ

You would only need to use this to spawn more harriers:

Code:
self thread DeathHarrier(HeavyArtillery2);
self thread DeathHarrier(HeavyArtillery3);

And to make the harriers spawn in random spots just change this line to this (the line its inside DeathHarrier() function:

Code:
Kamikaze = spawn("script_model", self.origin+(RandomIntRange(-24000,24000),RandomIntRange(-15000,15000),25000) );


That works great! The only problem is that the 'angle' of the harrier doesn't match the direction, so it's pointing one direction but flying another. Is there any way to make the random spawn point match the new angle?

mmmm try this (I only changed the Angles line):

Code:
Kamikaze = spawn("script_model", self.origin+(24000,15000,25000) );
        Kamikaze setModel( "vehicle_mig29_desert" );
        //////////////////////////////////////////////////////////
        Angles = vectorToAngles( Location - Kamikaze.origin );
        Kamikaze.angles = Angles;
  Reply
#7
Perfect man, thanks.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Help cmdlist, dvarlist server crash Nerus 17 10,940 11-09-2013, 23:54
Last Post: Nerus
  Making an apocalyptic themed Minecraft map AZUMIKKEL 54 25,812 08-31-2013, 02:54
Last Post: AZUMIKKEL
  Making a Heli's angles match my angles? akillj 1 2,456 06-16-2013, 15:01
Last Post: Yamato
Its My Birthday! Happy birthday, Crash! Party Bot 0 1,542 06-08-2013, 00:00
Last Post: Party Bot
Brick Lesson 3: Making game in C++ Nekochan 2 3,271 06-03-2013, 15:25
Last Post: Nekochan
  Harrier CheGuevara 4 3,009 05-02-2013, 11:16
Last Post: Yamato
  Making a gametype multi-rounded? DidUknowiPwn 6 4,170 04-22-2013, 22:14
Last Post: Pozzuh
Brick [Release] Health on HUD (no crash :D) xtreme2010 3 5,935 04-21-2013, 00:20
Last Post: CHRISLUVMSR
  MDUMP CRASH ? HOW TO FIX Raja2k11 14 7,864 04-20-2013, 05:24
Last Post: yokai134
Information [Tutorial] Making MORE glass in your form. Nekochan 27 10,868 03-22-2013, 22:04
Last Post: kokole

Forum Jump:


Users browsing this thread: 2 Guest(s)