Poll

What part do you want first?

Maps
14 (23%)
Weapons
39 (63.9%)
Playertypes
8 (13.1%)

Total Members Voted: 61

Author Topic: Metroid Mod  (Read 26439 times)

Spider ball would be neat though. Still havn't found any one to animate yet huh?


Ok, I'm sorry I'm saying this but you need to get out of the topic. Nothing you are saying is helping me and you keep acting like you this is your mod.

Just trying to help.

Quote
function [MyWeapon]Image::onFire(%this,%obj,%slot)
{
   if(%obj.ThisWeapon_Fire == 1 || !%obj.ThisWeapon_Fire){
      %projectile = "gunprojectile";
      %spread=0.0009;
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
      return %p;
   }
   if(%obj.ThisWeapon_Fire == 2){
      %projectile = "spearprojectile";
      %spread=0.0014;
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
      return %p;
   }
   if(%obj.ThisWeapon_Fire == 3){
      %projectile = "gunprojectile";
      %spread=0.002;
      %i=0;
      while(%i<3){
         %vector = %obj.getMuzzleVector(%slot);
         %objectVelocity = %obj.getVelocity();
         %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
         %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
         %velocity = VectorAdd(%vector1,%vector2);
         %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
         %velocity = MatrixMulVector(%mat, %velocity);
  
         %p = new (%this.projectileType)()
         {
            dataBlock = %projectile;
            initialVelocity = %velocity;
            initialPosition = %obj.getMuzzlePoint(%slot);
            sourceObject = %obj;
            sourceSlot = %slot;
            client = %obj.client;
         };
         MissionCleanup.add(%p);
         %i++;
      }
      return %p;
   }
}
package myweapon_special
{
function servercmdshiftbrick(%client,%x,%y,%z){
   %obj=%client.player;
   if(%obj.getmountedimage(0)$=nametoid("[MyWeapon]")){
      if(%x){
         %obj.ThisWeapon_Fire=1;
         centerprint(%client,"Fire mode 1",4);
      }
      if(%y && %obj.myweaponmodule["spear"]){
         %obj.ThisWeapon_Fire=2;
         centerprint(%client,"Fire mode 2",4);
      }
      if(%z && %obj.myweaponmodule["shotgun"]){
         %obj.ThisWeapon_Fire=3;
         centerprint(%client,"Fire mode 3",4);
      }
   }else{
      parent::servercmdshiftbrick(%client,%x,%y,%z);
   }
}
};
activatepackage("myweapon_special");

registerOutputEvent("Player", "Myweapon_module", "string 32 100" TAB "bool", 0);

function Player::Myweapon_module(%player,%type,%bool){
   %player.myweaponmodule[%type]=%bool;
        if(%bool){
           centerprint(%obj.client,"Module added:\c1" SPC %type,5);
        }else{
                centerprint(%obj.client,"Module removed:\c1" SPC %type,5);
        }
}
Something like that will work.

I'm tired so I may not have this right, but the code makes it fires different projectiles and the one it fires depends on what mode it is in and whether you have gained that mode, right?

That looks like it would save a lot of download time considering that all the weapons will use the same model and animations. Thanks Rkynick, that system will work great.

That's exactly the system I said and you complained about it.

That's exactly the system I said and you complained about it.
Watch it, Space Guy gets mad. :P

Watch it, Space Guy gets mad. :P

SPACE GUY'S RAGE: You son of a ... I going to beat you head with a ****ing bat you son of a *****

But seriously, you did complain about that!

I'm tired so I may not have this right, but the code makes it fires different projectiles and the one it fires depends on what mode it is in and whether you have gained that mode, right?
Yes. In the example, I can have a brick do Player --> "Myweapon_addmodule" "shotgun" "check" and then the player can press the down brick movement key and use a shotgun mode on whatever weapon is myweapon.

That's exactly the system I said and you complained about it.
Lol.

Send me pics of the decal, I'll color them to make suit upgrade (I'm not forcing you to though.)

I spent a lot of time on it, and I think it looks great:




Don't worry, that's fake :D

The real decal will be 1000 times better, I promise.

Lol I nearly shat my self when I saw the decal. Thank god it was fake.

I spent a lot of time on it, and I think it looks great:
-snip-
Don't worry, that's fake :D
The real decal will be 1000 times better, I promise.
EPIC stuffZ RELESE NAO PLX! ;P

I spent a lot of time on it, and I think it looks great:




Don't worry, that's fake :D

The real decal will be 1000 times better, I promise.

Send me the real thing in paint! I'll make colors for other suits if you want

Send me the real thing in paint! I'll make colors for other suits if you want
No thanks