Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - xxrumaroxx

Pages: [1] 2 3
1
Help / 2x hight bricks
« on: April 02, 2012, 06:45:27 PM »
can some one post a link to the 2x hight bricks i cant seem to find them

2
Help / halo face and body
« on: April 02, 2012, 01:45:46 PM »
can some one paste a link to the halo face and body set i cant seem to find it

3
Modification Help / cloak and dagger duration
« on: April 02, 2012, 11:47:46 AM »
the following script is to the invisible watch packs cloak and dagger item. What number on what lines would I have to change in order to increase the duration of the time being invisible and also the regeneration speed of the cloak energy


datablock AudioProfile(bknifeCloakStabSound)
{
   filename = "./bknife_cloakstab.wav";
   description = AudioClosest3d;
   preload = true;
};

datablock ItemData(SpyKnifeWatchItem)
{
   category = "Weapon";  // Mission editor category
   className = "Weapon"; // For inventory system

    // Basic Item Properties
   shapeFile = "./SpyWatchItem.dts";
   rotate = false;
   mass = 1;
   density = 0.2;
   elasticity = 0.2;
   friction = 0.6;
   emap = true;

   //gui stuff
   uiName = "Cloak and Dagger";
   iconName = "./icon_iwatch";
   doColorShift = true;
   colorShiftColor = "1 0.78 0 1";

    // Dynamic properties defined by the scripts
   image = SpyKnifeWatchImage;
   canDrop = true;
   
   variableStore = "cloakEnergy";
   variableInitial = 100;
   variableReplace = 1;
};

datablock ShapeBaseImageData(SpyKnifeWatchImage)
{
   // Basic Item properties
   shapeFile = "./SpyWatchHand.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 -1000";
   eyeOffset = "0.8 0.65 -0.4";
   rotation = eulerToMatrix( "0 0 0" );
   eyeRotation = eulerToMatrix( "10 0 0" );

   className = "WeaponImage";
   item = SpyKnifeWatchItem;

   //raise your arm up or not
   armReady = false;
   
   //cloak stats
   isCloakWatch = 1;
   disableCloakActivate = 1;
   cloakDamageFlicker = 1;
   cloakChargeRate = 0.2;
   
   cloakSound = spyCloakSound;
   uncloakSound = spyUncloakSound;
   
   raycastWeaponRange = 3;
   raycastWeaponTargets = $TypeMasks::FxBrickObjectType |   //Targets the weapon can hit: Raycasting Bricks
               $TypeMasks::PlayerObjectType |   //AI/Players
               $TypeMasks::StaticObjectType |   //Static Shapes
               $TypeMasks::TerrainObjectType |   //Terrain
               $TypeMasks::VehicleObjectType;   //Vehicles
   raycastExplosionProjectile = bKnifeProjectile;
   raycastExplosionSound = "";
   raycastExplosionPlayerSound = "";
   raycastExplosionBrickSound = "";
   raycastDirectDamage = 1; //maxhp * 6
   raycastDirectDamageType = $DamageType::KnifeStab;

   doColorShift = true;
   colorShiftColor = SpyKnifeWatchItem.colorShiftC olor;

   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.2;
   stateTransitionOnTimeout[0]      = "CloakUse";
   stateSound[0]                    = weaponSwitchSound;
   
   //generic cloak + uncloak states
   
   stateName[1]                     = "CloakUse";
   stateScript[1]                   = "onCloakUse";
   stateTransitionOnAmmo[1]         = "Cloaking";
   stateTransitionOnTimeout[1]      = "CloakUse";
   stateWaitForTimeout[1]           = 0;
   stateTimeoutValue[1]             = "0.05";
   stateAllowImageChange[1]         = true;
   stateSequence[1]                 = "Ready";
   
   stateName[2]                     = "Cloaking";
   stateTransitionOnNoAmmo[2]       = "Uncloak";
   stateAllowImageChange[2]         = true;
   stateSequence[2]                 = "Cloaking";
   stateTimeoutValue[2]             = 1;
   stateTransitionOnTimeout[2]      = "Cloaked";
   
   stateName[3]                     = "Cloaked";
   stateTransitionOnTriggerDown[3]  = "KnifeStart";
   stateTransitionOnNoAmmo[3]       = "DeCloakCheckA";
   stateTransitionOnTimeout[3]      = "Cloaked";
   stateTimeoutValue[3]             = 0.05;
   stateWaitForTimeout[3]           = false;
   stateScript[3]                   = "onCloakCheck";
   stateAllowImageChange[3]         = true;
   stateSequence[3]                 = "FullyCloaked";
   
   stateName[4]                     = "Uncloak";
   stateTransitionOnAmmo[4]         = "Cloaking";
   stateAllowImageChange[4]         = true;
   stateSequence[4]                 = "Uncloaking";
   stateTimeoutValue[4]             = 1;
   stateTransitionOnTimeout[4]      = "CloakUse";
   
   //knife fire states
   
   stateName[5]                     = "KnifeStart";
   stateScript[5]                   = "onKnifeStart";
   stateTransitionOnTimeout[5]      = "KnifeLift";
   stateTimeoutValue[5]             = 0.4;
   
   stateName[6]                     = "KnifeLift";
   stateScript[6]                   = "onKnifeLift";
   stateTransitionOnTimeout[6]      = "KnifeFire";
   stateTimeoutValue[6]             = 0.7;
   
   stateName[7]                     = "KnifeFire";
   stateScript[7]                   = "onFire";
   stateTransitionOnTimeout[7]      = "KnifeEnd";
   stateTimeoutValue[7]             = 0.6;
   
   stateName[8]                     = "KnifeEnd";
   stateTransitionOnTimeout[8]      = "Cloaked";
   stateTimeoutValue[8]             = 0.1;
   stateWaitForTimeout[8]           = 0;
   stateScript[8]                   = "onKnifeEnd";
   
   //out of energy + decloak states
   
   stateName[9]                     = "DecloakCheckA";
   stateTransitionOnTimeout[9]      = "DecloakCheckB";
   stateTimeoutValue[9]             = 0.01;
   stateSequence[9]                 = "FullyCloaked";
   stateScript[9]                   = "onDecloakCheck";
   
   stateName[10]                    = "DecloakCheckB";
   stateSequence[10]                = "FullyCloaked";
   stateTransitionOnNoAmmo[10]      = "Decloaking";
   stateTransitionOnAmmo[10]        = "UncloakState";
   stateWaitForTimeout[10]          = 0;
   
   stateName[11]                    = "Decloaking";
   stateSequence[11]                = "Decloaking";
   stateTimeoutValue[11]            = 0.3;
   stateTransitionOnTriggerDown[11] = "KnifeStart";
   stateTransitionOnTimeout[11]     = "Decloaked";
   
   stateName[12]                    = "Decloaked";
   stateTransitionOnTriggerDown[12]  = "KnifeStart";
   stateTransitionOnAmmo[12]        = "Recloaking";
   stateTransitionOnTimeout[12]     = "DecloakedNext";
   stateTimeoutValue[12]            = 0.05;
   stateAllowImageChange[12]        = true;
   stateSequence[12]                = "Decloaked";
   stateScript[12]                  = "onCloakCheck";
   
   stateName[13]                    = "DecloakedNext";
   stateTransitionOnNoAmmo[13]      = "UncloakCheckA";
   
   stateName[14]                    = "Recloaking";
   stateSequence[14]                = "Recloaking";
   stateTransitionOnTriggerDown[14] = "KnifeStart";
   stateTimeoutValue[14]            = 0.3;
   stateTransitionOnTimeout[14]     = "Cloaked";
   
   stateName[15]                    = "UncloakState";
   stateScript[15]                  = "setNoAmmo";
   stateTimeoutValue[15]            = 0.01;
   stateTransitionOnTimeout[15]     = "Uncloak";
   
   stateName[16]                    = "UncloakCheckA";
   stateTransitionOnTimeout[16]     = "UncloakCheckB";
   stateTimeoutValue[16]            = 0.01;
   stateScript[16]                  = "onDecloakCheck";
   
   stateName[17]                    = "UncloakCheckB";
   stateTransitionOnAmmo[17]        = "UncloakState";
   stateTransitionOnNoAmmo[17]      = "Decloaked";
   stateWaitForTimeout[17]           = 0;
};

datablock ShapeBaseImageData(SpyKnifeWatchStabImage)
{
   // Basic Item properties
   shapeFile = ($TF2Knife::AltModels ? "Add-Ons/Weapon_ButterflyKnife/bknife2.dts" : "Add-Ons/Weapon_TF2ButterflyKnife/knife.dts");
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0.1 0.05";
   eyeOffset = "0 0 0";


   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = false;
   
   eyeOffset = "";
   
   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";
   
   // Projectile && Ammo.
   item = bKnifeItem;
   ammo = " ";
   projectile = bKnifeProjectile;
   projectileType = Projectile;
   
   //melee particles shoot from eye node for consistancy
   melee = true;
   doRetraction = false;
   //raise your arm up or not
   armReady = false;
   
   //casing = " ";
   doColorShift = true;
   colorShiftColor = ($TF2Knife::AltModels ? "0.400 0.196 0 0.5" : "0.3 0.3 0.3 0.5");
   
   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
   stateName[0]         = "Activate";
   stateTimeoutValue[0]      = 0.5;
   stateTransitionOnTimeout[0]   = "Ready";
   stateSequence[0]      = "ready";
   
   stateName[1]         = "Ready";
};

datablock ShapeBaseImageData(SpyKnifeWatchHiddenImage : SpyKnifeWatchStabImage)
{
   armReady = false;
   
   doColorShift = true;
   colorShiftColor = "0.3 0.3 0.3 0.2";
   
   stateSequence[0]      = "activate";
   
   offset = "0 0 -1000";
   eyeOffset = "0.5 0.8 -0.5";
};

function SpyKnifeWatchImage::onMount(%this,%obj,%slot)
{
   Parent::onMount(%this,%obj,%slot);
   
   %obj.setImageAmmo(%slot,0);
   %obj.currKnifeSlot = %obj.currTool;
   
   if(!%obj.isCloaking)
   {
      %obj.cloakEnergy = %obj.cloakEnergy + 20*%this.cloakChargeRate*(getSimTime()-%obj.lastUnCloakTime)/1000;
      %obj.lastUnCloakTime = getSimTime();
   }
   
   if(%obj.cloakEnergy > 100) %obj.cloakEnergy = 100;
   if(%obj.cloakEnergy < 0) %obj.cloakEnergy = 0;
   
   if(isObject(%obj.client))
   {
      %a = %obj.cloakEnergy;
      %b = 100;
      %start = "<color:FFFFFF>";
      %sep = "<color:111111>";
      %done = (%a >= %b) || (%a == 0);
      %end = (%a / %b) * 25;
      %str = (%a == 0 ? %sep : %start);
     
      for(%i=0;%i<25;%i++)
      {
         if(%i > %end && !%done)
         {
            %str = %str @ %sep;
            %done = 1;
         }
         %str = %str @ "|";
      }
      bottomprint(%obj.client, "<just:center>" @ %str, 2, 1);
   }
}

function SpyKnifeWatchImage::onUnMount(%this,%obj,%slot)
{
   Parent::onUnMount(%this,%obj,%slot);
   
   %obj.unMountImage(1);
   
   if(%obj.usingKnife)
   {
      if(isObject(%obj.client))
         %obj.client.setControlObject(%obj);
      %obj.noChangeTools = 0;
      %obj.usingKnife = 0;
   }
}

function SpyKnifeWatchImage::onCloakUse(%this,%obj,%slot)
{
   //put arm down since it's invisible from outside
   //
   %obj.playThread(1, armReadyRight);
   
   if(!%obj.isCloaked && !%obj.isCloaking)
   {
      %obj.beginCloak(%this);
      if(isObject(%obj.client))
         %obj.client.play2d(bKnifeUseSound);
      %obj.mountImage(SpyKnifeWatchHiddenImage, 1);
      %obj.cloakShowing = 0;
      cancel(%obj.cloakSched);
   }
}

function SpyKnifeWatchImage::onCloakCheck(%this,%obj,%slot)
{
   if(%obj.getState() $= "Dead")
      return;
   
   if(%obj.cloakEnergy <= 0.5)
   {
      if(isObject(%obj.client))
      {
         if(isObject(%obj.client.minigame) && %obj.client.tdmTeam != -1 && %obj.client.tdmteam !$= "")
            %col = getColorIDTable(%obj.client.minigame.teamCol[%obj.client.tdmTeam]);
         else
            %col = %obj.client.chestColor;
      }
      else
         %col = "1 1 1 1";
     
      %obj.cloakShowing = 1;
      %obj.unHideNode("ALL");
      %obj.setImageAmmo(%slot,0);
     
      if(isObject(%obj.client))
      {
         %obj.client.applyBodyParts();
         %obj.client.applyBodyColors();
      }
      else
         applyDefaultCharacterPrefs(%obj);
     
      %obj.setNodeColor("ALL",getWords(%col,0,2) SPC 0.5);
   }
   else
   {
      if(%obj.cloakShowing)
         %obj.hideNode("ALL");
      %obj.cloakShowing = 0;
      %obj.setImageAmmo(%slot,1);
   }
   
   %l = vectorLen(%obj.getVelocity());
   if(%l <= 0.1)
      %obj.cloakEnergy += 0.3;
   else
      %obj.cloakEnergy -= 0.25*%l/1.5;
   
   if(%obj.cloakEnergy > 100) %obj.cloakEnergy = 100;
   if(%obj.cloakEnergy < 0) %obj.cloakEnergy = 0;
   
   if(isObject(%obj.client))
   {
      %a = %obj.cloakEnergy;
      %b = 100;
      %start = "<color:FFFFFF>";
      %sep = "<color:111111>";
      %done = (%a >= %b) || (%a == 0);
      %end = (%a / %b) * 25;
      %str = (%a == 0 ? %sep : %start);
     
      for(%i=0;%i<25;%i++)
      {
         if(%i > %end && !%done)
         {
            %str = %str @ %sep;
            %done = 1;
         }
         %str = %str @ "|";
      }
      bottomprint(%obj.client, "<just:center>" @ %str, 2, 1);
   }
}
function SpyKnifeWatchImage::onKnifeStart(%this,%obj,%slot)
{
   %obj.noChangeTools = 1;
   %obj.usingKnife = 1;
   if(%obj.cloakEnergy <= 0.5)
      %obj.cloakEnergy = 1;
   else
   {
      %obj.unHideNode("ALL");
      if(isObject(%obj.client))
      {
         %obj.client.applyBodyParts();
         %obj.client.applyBodyColors();
         if(isObject(%obj.client.minigame) && %obj.client.tdmTeam != -1 && %obj.client.tdmTeam !$= "")
            %col = getColorIDTable(%obj.client.minigame.teamCol[%obj.client.tdmTeam]);
         else
            %col = %obj.client.chestColor;
      }
      else
      {
         %col = "1 1 1 1";
         applyDefaultCharacterPrefs(%obj);
      }
      %hand = (%obj.isNodeVisible(rhand));
      %obj.hideNode("ALL");
   
      if(%hand)
      {
         %obj.unHideNode(rhand);
         %obj.setNodeColor(rhand,getWords(%col,0,2) SPC 0.3);
      }
      else
      {
         %obj.unHideNode(rhook);
         %obj.setNodeColor(rhook,getWords(%col,0,2) SPC 0.3);
      }
   }
   if(isObject(%obj.client))
   {
      if(isObject(%obj.client.camera) && %obj.client.getcontrolobject() == %obj)
      {
         %transform = %obj.getTransform();
         %obj.client.camera.setOrbitMode(%obj, %transform, 0.5, 8, 8, 1);
         %obj.client.camera.mode = "Orbit";
         %obj.client.setControlObject(%obj.client.camera);
      }
   }

   %obj.setImageAmmo(%slot,1);
   
   %obj.mountImage(SpyKnifeWatchStabImage, 1);
}

function SpyKnifeWatchImage::onKnifeLift(%this,%obj,%slot)
{
   %obj.playThread(2, spearReady);
}

function SpyKnifeWatchImage::onFire(%this,%obj,%slot)
{
   %obj.playThread(2, spearThrow);
   Parent::onFire(%this,%obj,%slot);
   serverPlay3d(bknifeCloakStabSound,%obj.getPosition());
}

function SpyKnifeWatchImage::onKnifeEnd(%this,%obj,%slot)
{
   //fixArmReady(%obj);
   %obj.hideNode(rhand);
   %obj.hideNode(rhook);
   %obj.mountImage(SpyKnifeWatchHiddenImage, 1);
   if(isObject(%obj.client))
      %obj.client.setControlObject(%obj);
   %obj.noChangeTools = 0;
   %obj.usingKnife = 0;
   
   if(%obj.currTool != %obj.currKnifeSlot)
   {
      if(%obj.currTool != -1)
         servercmdUseTool(%obj.client,%obj.currTool);
      else
         servercmdUnUseTool(%obj.client);
   }
}

function SpyKnifeWatchImage::onRaycastDamage(%this,%obj,%slot,%col,%pos,%normal,%shotVec,%crit)
{
   %damageType = $DamageType::Direct;
   if(%this.raycastDirectDamageType)
      %damageType = %this.raycastDirectDamageType;
   
   %scale = getWord(%obj.getScale(), 2);
   %colscale = getWord(%col.getScale(),2);
   
   %directDamage = %colScale * %col.dataBlock.maxDamage * 6;
   %col.spawnExplosion(critProjectile,%colscale);
   if(isObject(%col.client))
      %col.client.play2d(critRecieveSound);
   
   if(isObject(%obj.client))
      %obj.client.play2d(critHitSound);
     
   %col.setVelocity(vectorAdd(%col.getVelocity(),vectorAdd(vectorScale(%obj.getForwardVector(),20),"0 0 10")));
   %col.schedule(0,damage,%obj, %pos, %directDamage, %damageType);
}

function SpyKnifeWatchImage::onDecloakCheck(%this,%obj,%slot)
{
   %obj.setImageAmmo(%slot,%obj.isCloaking);
}

function SpyKnifeWatchImage::setNoAmmo(%this,%obj,%slot)
{
   %obj.setImageAmmo(%slot,0);
}

4
Help / OnPlayerTuch>MoveToBrick???
« on: April 01, 2012, 12:03:13 PM »
what event pack do i need to download to get the following event

OnPlayerTuch>MoveToBrick

5
Help / My server keeps crashing
« on: March 25, 2012, 05:29:17 PM »
for some reason my server keeps randomly crashing. and by random i mean it just freezes after awhile until i have to force quit it and its not even like its lagging or my whole computer freezes just BL. I'm playing on a mac btw. so dose anyone know what i can do to make stop.

6
Help / i for got my BL code
« on: March 24, 2012, 10:04:25 AM »
i havent played BL for abot 3-4 months and i had my code on a sticky note on my desk top but i deleted it a while back thinking i wouldent play again is there any way i can get it back posibaly by email or somthing

7
Help / dedicated server how to?
« on: December 20, 2011, 04:45:13 PM »
How do i dedicated my blockland server?

8
Gallery / Battle Field 3(wip beta)
« on: December 20, 2011, 11:27:37 AM »

This is a 2 team CTF as for now. It’s a TDM designed to preserve the lifespan of charters. As in it prevents constant head to head collision, and threes meant to be a lot of space so if you need to you can escape enemy fire and go heal up. Here some picks.


















Shout out to Lamebro1’s server ROTA(rise of the armies).
you just gave me a great build idea!
Well you might as well give credit.

9
Help / i need a nice army player look for my new server
« on: December 20, 2011, 08:59:53 AM »
can some one post a link to a nice army decal and face set.

10
Gallery / Way Of The Sword(now public)
« on: December 08, 2011, 07:42:01 PM »
I soon got bored with the “4th great ninja war TDM” also people are not coming as much as when I first released it. Anyways this is not necessarily the second version of the “4th great ninja war TDM” but more of a modified version of it. The build is completely different and 100% mine this time. Pictures bellow.

                                                                                                                



















Spawn Room




Press S to save bricks, press L to load bricks, and use door to move to battle field


Stand on red plate to see what the item dose and click red plate to see cost or to get the item.


Coming soon by the way the server is only beta. I want to know if you all think I should make the map dark, leave it, or maybe something creative like a dark reddish glow or something like that. Leave your thoughts below.

11
Gallery / Being remade
« on: November 27, 2011, 07:17:23 PM »
Due to popular deman this will be recreated as a knighf tdm but just with swords, much more addons and the build will include a lil more than just floating plates

12
General Discussion / 4th great ninja war
« on: November 25, 2011, 09:17:20 PM »
if you watch Naruto, you may know that that's where I have gotten my title from. Before I destroy any ones hopes upon them entering my server I want to let you know though the title of the TDM comes from Naruto it actually has no Naruto based add-ons.  On the other hand it is still going to be a great server. The reason I said going to be is because I have every thing about the TDM figured out, how the teams are going to be, how they will earn better weapons, est., buuutttt I don’t yet have a build. That’s all I need now. I do plan on getting started with the build soon though. The only thing is I'm not good when it comes to building  anything ninja like at all. If you know me on blocklannd you would also know the only kind of builds I make are futuristic builds, such as space ships and stuff like that. So even though I am planning on attempting to create the build my self if any one is good at ninja/village style builds and you would like to help plz add me on RTB and PM me about it when I'm online . My name on RTB is “SOSOG”. I’m looking forward to all the help I can get and trust me in the end the TDM will be very fun and well worth your time. Not to mention this TDM will be unique and unlike any other. And occurs, if you help out your name will surely be mentioned in the credit section of my updated post.


13
Gallery / go to link in message
« on: November 25, 2011, 03:28:12 AM »

14
Modification Help / ammo scripting help??
« on: November 24, 2011, 03:36:29 AM »
bellow this text you will find the script to a weapon, specifically the combat MG, from frogs weaponry. in this script on line 77 where it sais "max amo = 50" this refers to the maximum amount of amo the gun will be able to fire continually without stopping. in other words its the amount of amo the player will be able to fire before needing to reload, which would be 50 in this case. in order to change the max amount of amo all i need to do is change that number 50 on line 77. that i understand. in the game when im using the gun there is the amount of amo i can use before i reload then there is the amount of amo that i can reload with in this case, for the combat mg, it is 50 out of 90. so once i use all 50 shots i can reload the max allowed of 50 then i have 10 bullets left that i can reload after using the round i just loaded. so as i said i understand that to adjust the max amount of bullets that i can have in use i must adjust the # 50 on line 77 of the script, but how do i adjust the amount of bullets that i have to reload with, being 90 in this case?????



//audio
datablock AudioProfile(CombatMGFireSound)
{
   filename    = "./CombatMGFire.wav";
   description = AudioClose3d;
   preload = true;
};

datablock AudioProfile(FWReload2Sound)
{
   filename    = "./FWReload2.wav";
   description = AudioClose3d;
   preload = true;
};

AddDamageType("CombatMG",   '<bitmap:add-ons/Weapon_Frogs_Weaponry/CI_CombatMG> %1',    '%2 <bitmap:add-ons/Weapon_Frogs_Weaponry/CI_CombatMG> %1',0.75,1);
datablock ProjectileData(CombatMGProjectile1)
{
   projectileShapeName = "add-ons/Weapon_Gun/bullet.dts";
   directDamage        = 12; //9
   directDamageType    = $DamageType::CombatMG;
   radiusDamageType    = $DamageType::CombatMG;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloati ng = 2;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse        = 20;
   verticalImpulse     = 10;
   explosion           = gunExplosion;

   muzzleVelocity      = 120;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = true;
   gravityMod = 0.7;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};

//////////
// item //
//////////
datablock ItemData(CombatMGItem)
{
   category = "Weapon";  // Mission editor category
   className = "Weapon"; // For inventory system

    // Basic Item Properties
   shapeFile = "./CombatMG.dts";
   rotate = false;
   mass = 1;
   density = 0.2;
   elasticity = 0.2;
   friction = 0.6;
   emap = true;

   //gui stuff
   uiName = "Combat MG";
   iconName = "./icon_CombatMG";
   doColorShift = true;
   colorShiftColor = "1 1 1 1.000";

    // Dynamic properties defined by the scripts
   image = CombatMGImage;
   canDrop = true;
   
   maxAmmo = 50;
   canReload = 1;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(CombatMGImage)
{
   // Basic Item properties
   shapeFile = "./CombatMG.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = CombatMGItem;
   ammo = " ";
   projectile = CombatMGProjectile1;
   projectileType = Projectile;

   casing = GunShellDebris;
   shellExitDir        = "1.0 0.1 1.0";
   shellExitOffset     = "0 0 0";
   shellExitVariance   = 10.0;
   shellVelocity       = 5.0;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = true;
   colorShiftColor = CombatMGItem.colorShiftColor;

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.05;
   stateTransitionOnTimeout[0]       = "LoadCheckA";
   stateSound[0]               = weaponSwitchSound;

   stateName[1]                     = "Ready";
   stateTransitionOnNoAmmo[1]       = "Reload";
   stateTransitionOnTriggerDown[1]  = "Fire";
   stateSequence[1]                 = "Winddown";
   stateAllowImageChange[1]         = true;

   stateName[2]                    = "Fire";
   stateTransitionOnTimeout[2]     = "Delay";
   stateTimeoutValue[2]            = 0.0001; //0.01
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Winddown";
   stateScript[2]                  = "onFire";
   stateEjectShell[2]            = true;
   stateEmitter[2]               = gunFlashEmitter;
   stateEmitterTime[2]            = 0.05;
   stateEmitterNode[2]            = "muzzleNode";
   stateWaitForTimeout[2]         = true;
   stateSound[2]               = CombatMGFireSound;

   stateName[3]                 = "Delay";
   stateTransitionOnTimeout[3]     = "FireLoadCheckA";
   stateTimeoutValue[3]            = 0.0001; //0.025
   stateEmitter[3]               = gunSmokeEmitter;
   stateEmitterTime[3]            = 0.03;
   stateEmitterNode[3]            = "muzzleNode";
   statesequence[3]                                = "Fire";

   stateName[4]            = "LoadCheckA";
   stateScript[4]            = "onLoadCheck";
   stateTimeoutValue[4]         = 0.01;
   stateTransitionOnTimeout[4]      = "LoadCheckB";
   
   stateName[5]            = "LoadCheckB";
   stateTransitionOnAmmo[5]      = "Ready";
   stateTransitionOnNoAmmo[5]      = "Reload";

   stateName[6]            = "Reload";
   stateTimeoutValue[6]         = 1.6;
   stateScript[6]            = "onReloadStart";
   stateTransitionOnTimeout[6]      = "Wait";
   stateWaitForTimeout[6]         = true;
   
   stateName[7]            = "Wait";
   stateTimeoutValue[7]         = 0.8;
   stateScript[7]            = "onReloadWait";
        stateTransitionOnTimeout[7]      = "Reloaded";
   
   stateName[8]            = "FireLoadCheckA";
   stateScript[8]            = "onLoadCheck";
   stateTimeoutValue[8]         = 0.001; //0.01
   stateTransitionOnTimeout[8]      = "FireLoadCheckB";

   stateName[9]            = "FireLoadCheckB";
   stateTransitionOnAmmo[9]      = "Smoke";
   stateTransitionOnNoAmmo[9]      = "ReloadSmoke";

   stateName[10]             = "Smoke";
   stateEmitter[10]         = gunSmokeEmitter;
   stateEmitterTime[10]         = 0.05; //0.3
   stateEmitterNode[10]         = "muzzleNode";
   stateTimeoutValue[10]         = 0.0001;
   stateTransitionOnTimeout[10]      = "Ready";
   stateTransitionOnTriggerDown[10]   = "Fire";
   statesequence[10]                       = "Winddown";
   
   stateName[11]             = "ReloadSmoke";
   stateEmitter[11]         = gunSmokeEmitter;
   stateEmitterTime[11]         = 0.3;
   stateEmitterNode[11]         = "muzzleNode";
   stateTimeoutValue[11]         = 0.2;
   stateTransitionOnTimeout[11]      = "Reload";
   statesequence[11]                       = "Winddown";
       
   stateName[12]            = "Reloaded";
   stateTimeoutValue[12]         = 0.01;
   stateScript[12]            = "onReloaded";
   stateTransitionOnTimeout[12]      = "Ready";
};

function CombatMGImage::onFire(%this,%obj,%slot)
{
   %projectile = CombatMGProjectile1;
   
   if(vectorLen(%obj.getVelocity()) < 0.1)
   {
      %spread = 0.0015; //0.0025
   }
   else
   {
      %spread = 0.0025; //0.0035
   }
   
   %shellcount = 1;

   %obj.playThread(2, plant);
   %shellcount = 1;
   %obj.toolAmmo[%obj.currTool]--;
   %obj.AmmoSpent[%obj.currTool]++;

   %obj.spawnExplosion(TTRecoilProjectile,"1 1 1");
                  commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);

   for(%shell=0; %shell<%shellcount; %shell++)
   {
      %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;
}
function CombatMGImage::onReloadStart(%this,%obj,%slot)
{                 commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["556rounds"] >= 1)
   {
   %obj.playThread(2, shiftRight);
            serverPlay3D(block_MoveBrick_Sound,%obj.getPosition());
   }
}

function CombatMGImage::onReloadWait(%this,%obj,%slot)
{
                  commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);
    if(%obj.client.quantity["556rounds"] >= 1)
   {
   %obj.playThread(2, plant);
            serverPlay3D(FWReload2Sound,%obj.getPosition());
   }
}

function CombatMGImage::onReloaded(%this,%obj,%slot)
{
    if(%obj.client.quantity["556rounds"] >= 1)
   {

        if(%obj.client.quantity["556rounds"] > %this.item.maxAmmo)
   {
      %obj.client.quantity["556rounds"] -= %obj.AmmoSpent[%obj.currTool];
      %obj.toolAmmo[%obj.currTool] = %this.item.maxAmmo;
      %obj.AmmoSpent[%obj.currTool] = 0;
      %obj.setImageAmmo(%slot,1);
                  commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);
      return;
   }

        if(%obj.client.quantity["556rounds"] <= %this.item.maxAmmo)
   {
      %obj.client.exchangebullets = %obj.client.quantity["556rounds"];
      %obj.toolAmmo[%obj.currTool] = %obj.client.exchangebullets;
      %obj.setImageAmmo(%slot,1);
      %obj.client.quantity["556rounds"] = 0;
                  commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);
      return;
   }
}
}

function CombatMGProjectile1::damage(%this,%obj,%col,%fade,%pos,%normal)
{
   if(%col.getType() & $TypeMasks::PlayerObjectType)
   {
      %col.setVelocity(getWord(%col.getVelocity(),0)/1.2 SPC getWord(%col.getVelocity(),1)/1.2 SPC getWord(%col.getVelocity(),1.2));
   }
parent::damage(%this,%obj,%col,%fade,%pos,%normal);
}

function CombatMGImage::onMount(%this,%obj,%slot)
{
   Parent::onMount(%this,%obj,%slot);
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>5.56 Little Rifle <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["556rounds"] @ "", 4, 2, 3, 4);
}

function CombatMGImage::onUnMount(%this,%obj,%slot)
{
   %obj.playThread(2, root);
}


15
Help / smoth brick?
« on: November 24, 2011, 02:07:22 AM »
how i make a bricks surface smooth?

Pages: [1] 2 3