Author Topic: A modified Rocket Launcher  (Read 1714 times)

Bump

slimabob wants to have a rocket launcher that only fires in the air

Yes, this is exactly what I want

OH
I GET THE MISUNDERSTANDING

Treynolds thinks that it's about the direction that the rocket launcher is firing, so that it can't fire in a direction that will cause it to end up hitting something.
Myself and (I think) slimabob want something that only allows the rocket launcher to fire when the PLAYER is in midair.

Funny how English works.


Myself and (I think) slimabob want something that only allows the rocket launcher to fire when the PLAYER is in midair.

Yep, that is exactly it

What about making a battlefield with a bunch of baseplates with addvelocity events?  It forces them to jump and no tricky scripting is required.

uh ill just leave this here

   function Player::IsOnGround(%player)
   {
      %pos = %player.getPosition();
      %scale = %player.getScale();
      %xs = getWord(%scale,0);
      %ys = getWord(%scale,1);
      
      %nw = vectorAdd(%pos,0 - (0.75 * %xs) SPC 0 - (0.75 * %ys) SPC 0);
      %dnw = vectorAdd(%nw,"0 0 -0.5");
      %ne = vectorAdd(%pos,(0.75 * %xs) SPC 0 - (0.75 * %ys) SPC 0);
      %dne = vectorAdd(%ne,"0 0 -0.5");
      %se = vectorAdd(%pos,(0.75 * %xs) SPC (0.75 * %ys) SPC 0);
      %dse = vectorAdd(%se,"0 0 -0.5");
      %sw = vectorAdd(%pos,0 - (0.75 * %xs) SPC (0.75 * %ys) SPC 0);
      %dsw = vectorAdd(%sw,"0 0 -0.5");
      %dpos = vectorAdd(%pos,"0 0 -0.5");

      %raynw = ag_bicheck(getWord(containerRaycast(%nw,%dnw,$TypeMasks::FxBrickAlwaysObjectType|$TypeMasks::InteriorObjectType),0));
      %rayne = ag_bicheck(getWord(containerRaycast(%ne,%dne,$TypeMasks::FxBrickAlwaysObjectType|$TypeMasks::InteriorObjectType),0));
      %rayse = ag_bicheck(getWord(containerRaycast(%se,%dse,$TypeMasks::FxBrickAlwaysObjectType|$TypeMasks::InteriorObjectType),0));
      %raysw = ag_bicheck(getWord(containerRaycast(%sw,%dsw,$TypeMasks::FxBrickAlwaysObjectType|$TypeMasks::InteriorObjectType),0));
      %rayce = ag_bicheck(getWord(containerRaycast(%pos,%dpos,$TypeMasks::FxBrickAlwaysObjectType|$TypeMasks::InteriorObjectType),0));

      if(%raynw || %rayne || %rayse || %raysw || %rayce)
      {
         return 1;
      }
      else
      {
         return 0;
      }
   }

   function ag_bicheck(%obj)
   {
      if(!isObject(%obj))
      {
         return 0;
      }
      if(%obj.getClassName() $= "fxDTSbrick")
      {
         if(%obj.isColliding() && %obj.isRendering())
         {
            return 1;
         }
         return 0;
      }
      return 1;
   }


uh ill just leave this here

-snip-

I love you.

If only I knew what to do with it...

OH
I GET THE MISUNDERSTANDING

Treynolds thinks that it's about the direction that the rocket launcher is firing, so that it can't fire in a direction that will cause it to end up hitting something.
Myself and (I think) slimabob want something that only allows the rocket launcher to fire when the PLAYER is in midair.

Funny how English works.
Oh, I see
Disregard what I said


uh... stuff.

Be right back, guys

in case it wasn't clear I'm going to make this.

WELL THIS IS JUST STUPID.

I have it working 100%... except for the fact that it still does radius damage.

Edit: Oh, duh, the explosion.
Final test.
« Last Edit: March 07, 2012, 10:35:40 PM by Lugnut1206 »

http://dl.dropbox.com/u/58130173/Weapon_RocketJumper.zip

Pretty maroon color, does 0.001 damage because I couldn't get away with 0 for some reason. Has a really large blast radius. Not really sure why.

http://dl.dropbox.com/u/58130173/Weapon_RocketJumper.zip

Pretty maroon color, does 0.001 damage because I couldn't get away with 0 for some reason. Has a really large blast radius. Not really sure why.


Thanks so much, I'll test it out right now!

EDIT:

Just curious, why does it do such little damage?

Another Edit:

For some reason, it's only firing when I'm on the ground which is quite problematic.
« Last Edit: March 07, 2012, 11:15:53 PM by slimabob »

............................. ......................
Isn't that what you wanted? Only when you were on the ground?
It does little damage because it was supposed to do no damage.


I'm confused what you wanted :(

I wanted a rocket launcher that was exactly like the default one, but could only shoot when you were in the air. So close, but not quite

oh IN the air
um
that's a one character modification, no biggie