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 - _OXBADCODE#

Pages: 1 2 3 4 [5] 6 7 8
61
Modification Help / syntax errors
« on: July 19, 2016, 06:12:50 PM »
here they come
datablock AudioProfile(kickfire)
{
  filename = "./kickmiss.wav";
  description = AudioClose3d;
  preload = true;
};

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

datablock ParticleData(pushBroomSparkParticle)
{
   dragCoefficient      = 4;
   gravityCoefficient   = 1;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 400;
   lifetimeVarianceMS   = 300;
   textureName          = "base/data/particles/chunk";
   
   useInvAlpha = false;
   spinSpeed      = 150.0;
   spinRandomMin      = -150.0;
   spinRandomMax      = 150.0;

   colors[0]     = "0.30 0.10 0.0 0.0";
   colors[1]     = "0.30 0.10 0.0 0.5";
   colors[2]     = "0.30 0.10 0.0 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.15;
   sizes[2]      = 0.15;

   times[0]   = 0.1;
   times[1] = 0.5;
   times[2] = 1.0;

   useInvAlpha = true;
};

datablock ParticleEmitterData(pushBroomSparkEmitter)
{
   lifeTimeMS = 10;

   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 3.0;
   ejectionOffset   = 1.50;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = pushBroomSparkParticle;

   uiName = "Push Broom Chunk";
};




datablock ParticleData(pushBroomExplosionParticle)
{
   dragCoefficient      = 10;
   gravityCoefficient   = -0.15;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 800;
   lifetimeVarianceMS   = 500;
   textureName          = "base/data/particles/cloud";

   spinSpeed      = 50.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;

   colors[0]     = "1.0 1.0 1.0 0.25";
   colors[1]     = "0.0 0.0 0.0 0.0";
   sizes[0]      = 0.5;
   sizes[1]      = 1.0;

   useInvAlpha = true;
};

datablock ParticleEmitterData(pushBroomExplosionEmitter)
{
   lifeTimeMS = 50;

   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 10;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 95;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = pushBroomExplosionParticle;

   uiName = "Push Broom Dust";
   emitterNode = HalfEmitterNode;
};

datablock ExplosionData(pushBroom2Explosion)
{
   //explosionShape = "";
   lifeTimeMS = 10;
   
   //emitter[0] = pushBroomExplosionEmitter;
   emitter[0] = pushBroomSparkEmitter;
   particleEmitter = pushBroomExplosionEmitter;
   particleDensity = 15;
   particleRadius = 0.5;
   
   faceViewer     = true;
   explosionScale = "1 1 1";

   soundProfile = kickhit;

   
   shakeCamera = false;
   cameraShakeFalloff = false;
   camShakeFreq = "2.0 3.0 1.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 2.5;
   camShakeRadius = 0.0001;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 0;
   lightStartColor = "0.0 0.0 0.0";
   lightEndColor = "0 0 0";
};



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

//shell
datablock DebrisData(KickShellDebris)
{
   shapeFile = "./shotgunShell.dts";
   lifetime = 2.0;
   minSpinSpeed = -400.0;
   maxSpinSpeed = 200.0;
   elasticity = 0.5;
   friction = 0.2;
   numBounces = 3;
   staticOnMaxBounce = true;
   snapOnMaxBounce = false;
   fade = true;

   gravModifier = 2;
};

//emitter

ParticleData(KickSmokeParticle)
{##
##
   dragCoefficient      = 3;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.5 0.5 0.5 0.5";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.1;

   useInvAlpha = false;
};

datablock ParticleEmitterData(KickSmokeEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "KickSmokeParticle";
};

AddDamageType("Kick",   '<bitmap:add-ons/Weapon_Kick/CI_Kick> %1',    '%2 <bitmap:add-ons/Weapon_Kick/CI_Kick> %1',0.5,1);
datablock ProjectileData(KickProjectile)

{
   //projectileShapeName = "~/data/shapes/arrow.dts";
   directDamage        = 10;
   impactImpulse       = 500;
   verticalImpulse     = 500;
   explosion           = pushBroom2Explosion;
   //particleEmitter     = as;

   muzzleVelocity      = 50;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 100;
   fadeDelay           = 70;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod = 0.0;

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

   uiName = "Kick Test";
};

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

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

   //gui stuff
   uiName = "Kick";
   iconName = "./KickIcon";
   doColorShift = true;
   colorShiftColor = "0.5 0.5 0.5 1.000";

    // Dynamic properties defined by the scripts
   image = kickImage;
   canDrop = true;
};

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

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 1; //change this to the right foot, I can't remember what number it is off the top of my head
   offset = "0 0 0";
   eyeoffset = "0.4 2.9 -0.45";
   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 = KickItem;
   ammo = " ";
   projectile = KickProjectile; //is this really what you will use?
   projectileType = Projectile;

   casing = KickShellDebris;
   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 = true;
   //raise your arm up or not
   armReady = false;
   minShotTime = 1000;

   doColorShift = true;
   colorShiftColor = KickItem.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.5;
                stateTransitionOnTimeout[0]    = "Ready";
                stateWaitForTimeout[0]         = true;
                stateSound[0]                  = weaponSwitchSound;

                stateName[1]                   = "Ready";
                stateTransitionOnTriggerDown[1]= "Fire";
                stateAllowImageChange[1]       = true;
//            stateEmitter[1]                = PyGunambientEmitter;
//            stateEmitterTime[1]            = 1000;
//            stateEmitterNode[1]            = "muzzlePoint";

   stateName[2]                    = "Fire";
   stateTransitionOnTimeout[2]     = "Smoke";
   stateTimeoutValue[2]            = 0.2;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Fire";
   stateScript[2]                  = "onFire";
   stateWaitForTimeout[2]        = true;
   stateSound[2]           = kickfire;
   stateTransitionOnTimeout[2]     = "Smoke";

   stateName[3]            = "Smoke";
   stateScript[3]         = "onSmoke";
   stateTimeoutValue[3]            = 0.5;
   stateTransitionOnTimeout[3]     = "Ready";
};

function kickImage::onFire(%this, %obj, %slot)
{
   %obj.hideNode(rShoe);
   %obj.hideNode(rPeg);
}

function kickImage::onSmoke(%this, %obj, %slot)
{
   %obj.unMountImage(Mountpoint1); //I have forgotten the number the rShoe is
   %obj.client.applyBodyParts();
   %obj.client.applyBodyColors();
}


the syntax is here

//emitter

ParticleData(KickSmokeParticle)
{##
##

   dragCoefficient      = 3;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.5 0.5 0.5 0.5";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.1;

   useInvAlpha = false;
};

62
Drama / Dogling ddosing?
« on: July 09, 2016, 02:20:59 PM »
The SWAT server got ddoses i think.
There was a huge lagspike after dogling left the server.



63
I am making a postal 2 kick thingy and I have no clue how to make it so when i press left click, the model appears, then a certain body part (right leg) hides itself and after the kick is done the leg appears and the model is hidden untill i fire the "weapon" again
Code: [Select]
//effects


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

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

datablock ParticleData(pushBroomSparkParticle)
{
   dragCoefficient      = 4;
   gravityCoefficient   = 1;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 400;
   lifetimeVarianceMS   = 300;
   textureName          = "base/data/particles/chunk";

useInvAlpha = false;
spinSpeed = 150.0;
spinRandomMin = -150.0;
spinRandomMax = 150.0;

   colors[0]     = "0.30 0.10 0.0 0.0";
   colors[1]     = "0.30 0.10 0.0 0.5";
   colors[2]     = "0.30 0.10 0.0 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.15;
   sizes[2]      = 0.15;

   times[0] = 0.1;
   times[1] = 0.5;
   times[2] = 1.0;

   useInvAlpha = true;
};

datablock ParticleEmitterData(pushBroomSparkEmitter)
{
lifeTimeMS = 10;

   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 3.0;
   ejectionOffset   = 1.50;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = pushBroomSparkParticle;

   uiName = "Push Broom Chunk";
};




datablock ParticleData(pushBroomExplosionParticle)
{
   dragCoefficient      = 10;
   gravityCoefficient   = -0.15;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 800;
   lifetimeVarianceMS   = 500;
   textureName          = "base/data/particles/cloud";

spinSpeed = 50.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;

   colors[0]     = "1.0 1.0 1.0 0.25";
   colors[1]     = "0.0 0.0 0.0 0.0";
   sizes[0]      = 0.5;
   sizes[1]      = 1.0;

   useInvAlpha = true;
};

datablock ParticleEmitterData(pushBroomExplosionEmitter)
{
lifeTimeMS = 50;

   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 10;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 95;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = pushBroomExplosionParticle;

   uiName = "Push Broom Dust";
   emitterNode = HalfEmitterNode;
};

datablock ExplosionData(pushBroom2Explosion)
{
   //explosionShape = "";
   lifeTimeMS = 10;
   
   //emitter[0] = pushBroomExplosionEmitter;
   emitter[0] = pushBroomSparkEmitter;
   particleEmitter = pushBroomExplosionEmitter;
   particleDensity = 15;
particleRadius = 0.5;
   
   faceViewer     = true;
   explosionScale = "1 1 1";

   soundProfile = kickhit;

   
   shakeCamera = false;
   cameraShakeFalloff = false;
   camShakeFreq = "2.0 3.0 1.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 2.5;
   camShakeRadius = 0.0001;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 0;
   lightStartColor = "0.0 0.0 0.0";
   lightEndColor = "0 0 0";
};



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

//shell
datablock DebrisData(shotgunShellDebris)
{
shapeFile = "./shotgunShell.dts";
lifetime = 2.0;
minSpinSpeed = -400.0;
maxSpinSpeed = 200.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 3;
staticOnMaxBounce = true;
snapOnMaxBounce = false;
fade = true;

gravModifier = 2;
};

//emitter
datablock ParticleData(shotgunSmokeParticle)
{
dragCoefficient      = 3;
gravityCoefficient   = -0.5;
inheritedVelFactor   = 0.2;
constantAcceleration = 0.0;
lifetimeMS           = 525;
lifetimeVarianceMS   = 55;
textureName          = "base/data/particles/cloud";
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0]     = "0.5 0.5 0.5 0.5";
colors[1]     = "0.5 0.5 0.5 0.0";
sizes[0]      = 0.15;
sizes[1]      = 0.1;

useInvAlpha = false;
};
datablock ParticleEmitterData(shotgunSmokeEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "shotgunSmokeParticle";
};

AddDamageType("Shotgun",   '<bitmap:add-ons/Weapon_Shotgun/CI_shotgun> %1',    '%2 <bitmap:add-ons/Weapon_Shotgun/CI_shotgun> %1',0.5,1);
datablock ProjectileData(shotgunProjectile)

{
   //projectileShapeName = "~/data/shapes/arrow.dts";
   directDamage        = 10;
   impactImpulse       = 500;
   verticalImpulse     = 500;
   explosion           = pushBroom2Explosion;
   //particleEmitter     = as;

   muzzleVelocity      = 50;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 100;
   fadeDelay           = 70;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod = 0.0;

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

   uiName = "Kick Test";
};

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

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

//gui stuff
uiName = "Kick";
iconName = "./shotgunIcon";
doColorShift = true;
colorShiftColor = "0.5 0.5 0.5 1.000";

// Dynamic properties defined by the scripts
image = shotgunImage;
canDrop = true;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(shotgunImage)
{
   // Basic Item properties
   shapeFile = "./Kick.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.4 2.9 -0.45";
   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 = shotgunItem;
   ammo = " ";
   projectile = shotgunProjectile;
   projectileType = Projectile;

   casing = shotgunShellDebris;
   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 = true;
   //raise your arm up or not
   armReady = false;
   minShotTime = 1000;

   doColorShift = true;
   colorShiftColor = shotgunItem.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.15;
stateTransitionOnTimeout[0]     = "Ready";
stateSound[0]   = weaponSwitchSound;

stateName[1]                    = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1]        = true;
stateTimeoutValue[1]   = 0.01;

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Smoke";
stateTimeoutValue[2]            = 0.5;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2]   = true;
// stateEmitter[2]   = gunFlashEmitter;
stateEmitterTime[2]   = 0.05;
stateEmitterNode[2]   = "muzzleNode";
stateSound[2]   = kickfire;
stateTransitionOnTimeout[2]   = "Smoke";

stateName[3]   = "Smoke";
// stateEmitter[3]   = shotgunSmokeEmitter;
// stateEmitterTime[3]   = 0.1;
// stateEmitterNode[3]   = "muzzleNode";
stateTimeoutValue[3]            = 0.4;
stateTransitionOnTimeout[3]     = "Ready";

// stateName[4]   = "Reload";
// stateTimeoutValue[4]   = 0.3;
// stateSequence[4]   = "reload";
// stateTransitionOnTimeout[4]   = "Wait";
// stateWaitForTimeout[4]   = true;
// stateEjectShell[4]          = true;
// stateSound[4]   = shotgunReloadSound;

// stateName[5]   = "Wait";
// stateTimeoutValue[5]   = 0.1;
// stateTransitionOnTimeout[5]   = "Ready";
};

function shotgunImage::onFire(%this,%obj,%slot)
{
if((%obj.lastFireTime+%this.minShotTime) > getSimTime())
return;
%obj.lastFireTime = getSimTime();
     
%obj.setVelocity(VectorAdd(%obj.getVelocity(),VectorScale(%obj.client.player.getEyeVector(),"-3")));
%obj.playThread(2, shiftAway);

%projectile = %this.projectile;
%spread = 0.0015;
%shellcount = 3;

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 shotgunImage::onMount(%this, %obj, %slot)
{
        %obj.hidenode("Rshoe");
}


function shotgunImage::onUnMount(%this, %obj, %slot)
{
        %obj.unhidenode("Rshoe");
}


function shotgunImage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot);
   %obj.playThread(1, armreadyboth);
}
function shotgunImage::onUnMount(%this, %obj, %slot)
{
   Parent::onUnMount(%this, %obj, %slot);
}

64
Gallery / What have i done...
« on: July 04, 2016, 03:17:57 PM »

I hate myself so I made this

65
Add-Ons / Voxel Gore
« on: June 28, 2016, 10:12:09 AM »
Voxel Gore

If you think Cube Blood wasn't enough, get ready for this.



66
Modification Help / Where is the syntax error?
« on: June 28, 2016, 03:54:49 AM »
Can somebody please tell me where is it?
Code: [Select]
package ProjectileDismemberment
{
   function ProjectileData::damage(%this, %obj, %col, %fade, %pos, %normal)
   {
   parent::damage(%this, %obj, %col, %fade, %pos, %normal);
      if(%col.gettype() & $TypeMasks::PlayerObjectType && fileName(%col.dataBlock.shapeFile) $= "m.dts")
   {
      %fvec = %col.getForwardVector();
      %vec1 = -getWord(%fvec,1) SPC getWord(%fvec,0) SPC 0;
      %vec2 = vectorNormalize(%obj.initialVelocity);
     
      %damloc = (vectorDot(%vec1,%vec2) > 0);
     
      %scale = getWord(%col.getScale(),2);
      if(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3*%scale)
      {
            %obj.setNodeColor("headskin","0.7 0 0 1");
         if(!%col.disHead)
            {
         %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         for(%i=0;$hat[%i] !$= "";%i++) %hidestr = %hidestr SPC $hat[%i];
         for(%i=0;$accent[%i] !$= "";%i++) %hidestr = %hidestr SPC $accent[%i];
      }
      else if(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 4.5*%scale)
      {
         if(%damLoc == 0)
         {
            %obj.setNodeColor("lhand lhook larm larmslim","0.7 0 0 1");
            if(!%col.dislhand)
            {
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
         else
         {
            %obj.setNodeColor("rhand rhook rarm rarmslim","0.7 0 0 1");
            if(!%col.dishand)
            {
            %col.dishand = 1;
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
         }
         }
      }
      else
      {
         if(%damLoc == 0)
         {
            %obj.setNodeColor("lshoe lpeg","0.7 0 0 1");
            if(!%col.dislfoot)
            {
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
         else
         {
            %obj.setNodeColor("rshoe rpeg","0.7 0 0 1");
            if(!%col.disfoot)
            {
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
          else
           {
            %obj.setNodeColor("chest","0.7 0 0 1");
            if(!%col.dischest)
            {
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = aaaaaaaaaaaaaaaaaa;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
      }
     
      if(%col.dismembermentUnhideStr $= "")
         %col.dismembermentUnhideStr = "START";
     
      for(%i=0;%i<getWordCount(%hidestr);%i++)
      {
         %node = getWord(%hidestr,%i);
         if(%col.isNodeVisible(%node) && strStr(%col.dismembermentUnhideStr," " @ %node) == -1)
            %col.dismembermentUnhideStr = %col.dismembermentUnhideStr SPC %node;
         
         %col.hideNode(%node);
      }
     
      cancel(%col.dismembermentResetSched);
      %col.dismembermentResetSched = %col.schedule(5000,dismembermentReset);
   }

   //return Parent::Damage(%this, %obj, %col, %fade, %pos, %normal);
   }

   function WeaponImage::onRaycastDamage(%this,%obj,%slot,%col,%pos,%normal,%shotVec,%crit)
   {
      parent::onRaycastDamage(%this,%obj,%slot,%col,%pos,%normal,%shotVec,%crit);
     if(%col.gettype() & $TypeMasks::PlayerObjectType && fileName(%col.dataBlock.shapeFile) $= "m.dts")
   {
      %fvec = %col.getForwardVector();
      %vec1 = -getWord(%fvec,1) SPC getWord(%fvec,0) SPC 0;
      %vec2 = vectorNormalize(%obj.initialVelocity);
     
      %damloc = (vectorDot(%vec1,%vec2) > 0);
     
      %scale = getWord(%col.getScale(),2);
      if(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3*%scale)
      {
         %hidestr = "headskin";
         if(!%col.disHead)
            {
            %col.dishead =1;
            %col.kill();
         %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemExplosionProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         for(%i=0;$hat[%i] !$= "";%i++) %hidestr = %hidestr SPC $hat[%i];
         for(%i=0;$accent[%i] !$= "";%i++) %hidestr = %hidestr SPC $accent[%i];
      }
      else if(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 4.5*%scale)
      {
         if(%damLoc == 0)
         {
            %hidestr = "lhand lhook larm larmslim";
            if(!%col.dislhand)
            {
            %col.disLhand = 1;
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemLHandProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemshoulderProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
         else
         {
            %hidestr = "rhand rhook rarm rarmslim";
            if(!%col.dishand)
            {
            %col.dishand = 1;
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemHandProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemshoulderProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
         }
         }
      }
      else
      {
         if(%damLoc == 0)
         {
            %hidestr = "lshoe lpeg";
            if(!%col.dislfoot)
            {
            %col.disLfoot = 1;
            %col.setCrouching(1);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemFootProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
         else
         {
            %hidestr = "rshoe rpeg";
            if(!%col.disfoot)
            {
            %col.disfoot = 1;
            %col.setCrouching(1);
            %proj = new Projectile()
            {
               scale = %col.getScale();
               dataBlock = DismemFootProjectile;
               initialVelocity = %col.getVelocity();
               initialPosition = %col.getPosition();
               sourceObject = %col;
               sourceSlot = 0;
               client = %col.client;
            };
            MissionCleanup.add(%proj);
            }
         }
      }
     
      if(%col.dismembermentUnhideStr $= "")
         %col.dismembermentUnhideStr = "START";
     
      for(%i=0;%i<getWordCount(%hidestr);%i++)
      {
         %node = getWord(%hidestr,%i);
         if(%col.isNodeVisible(%node) && strStr(%col.dismembermentUnhideStr," " @ %node) == -1)
            %col.dismembermentUnhideStr = %col.dismembermentUnhideStr SPC %node;
         
         %col.hideNode(%node);
      }
     
      cancel(%col.dismembermentResetSched);
      %col.dismembermentResetSched = %col.schedule(5000,dismembermentReset);
   }
   }
};
activatepackage(ProjectileDismemberment);

datablock DebrisData(dismemheadDebris)
{
   emitters = smallBloodEmitter;

   shapeFile = "./head.dts";
   lifetime = 6.0;
   minSpinSpeed = -400.0;
   maxSpinSpeed = 200.0;
   elasticity = 0.5;
   friction = 0.2;
   numBounces = 3;
   staticOnMaxBounce = true;
   snapOnMaxBounce = false;
   fade = true;
   gravModifier = 2;
};
datablock DebrisData(dismemhandDebris : dismemheadDebris)
{
   emitters = smallBloodEmitter;

   shapeFile = "./hand.dts";
};
datablock DebrisData(dismemhandLeftDebris : dismemheadDebris)
{
   emitters = smallBloodEmitter;

   shapeFile = "./handLeft.dts";
};
datablock DebrisData(dismemshoulderDebris : dismemheadDebris)
{
   emitters = smallBloodEmitter;

   shapeFile = "./shoulder.dts";
};
datablock DebrisData(dismemfootDebris : dismemheadDebris)
{
   emitters = smallBloodEmitter;

   shapeFile = "./foot.dts";
};
datablock ProjectileData(DismemExplosionProjectile)
{
   projectileShapeName = "base/data/shapes/empty.dts";
   directDamage     = 10;
   directDamageType = $DamageType::Default; //Damagetype default actually does no damage
   radiusDamageType = $DamageType::Default;
   impactImpulse    = 10;
   verticalImpulse  = 10;
   explosion        = dismemExplosion;

   brickExplosionRadius            = 0;
   brickExplosionImpact            = false;
   brickExplosionForce             = 0;
   brickExplosionMaxVolume         = 0;
   brickExplosionMaxVolumeFloating = 0;

   muzzleVelocity   = 1;
   velInheritFactor = 1;

   lifetime         = 10;
   bounceElasticity = 0;
   bounceFriction   = 0;
   isBallistic    = false;
   explodeOnDeath = true;
   hasLight       = false;
};
datablock ExplosionData(dismemExplosion) //Gotta make sub-explosions first because an explosion has to exist to be a part of another explosion...
{
   lifetimeMS = 33;
   particleEmitter = "goreEmitter";
   debrisNumVariance      = 0;
   debrisPhiMin           = 0;
   debrisPhiMax           = 360;
   debrisThetaMin         = 5;
   debrisThetaMax         = 105;
   debrisVelocity         = 5;
   debrisVelocityVariance = 1;

   debris = dismemheadDebris;
   debrisNum = 1;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = false;

   lightStartRadius = 0;
   lightEndRadius = 0;

   impulseRadius = 100;
   impulseForce = 100;

   radiusDamage = 0;
   damageRadius = 0;
};
datablock ExplosionData(dismemExplosionFoot : dismemExplosion)
{
   particleEmitter = "goreEmitter";
   debris = dismemfootDebris;
   debrisNum = 1;
   lifeTimeMS = 500;
   particleDensity = 45;
   particleRadius  = 2.5;
};
datablock ProjectileData(DismemFootProjectile : DismemExplosionProjectile)
{
   particleEmitter = "goreEmitter";
 explosion = dismemExplosionFoot; 
};
datablock ExplosionData(dismemExplosionShoulder : dismemExplosion)
{
   particleEmitter = "goreEmitter";
   debris = dismemshoulderDebris;
   debrisNum = 1;
   lifeTimeMS = 500;
   particleDensity = 45;
   particleRadius  = 2.5;
};
datablock ProjectileData(DismemShoulderProjectile : DismemExplosionProjectile)
{
   particleEmitter = "goreEmitter";
 explosion = dismemExplosionShoulder; 
};
datablock ExplosionData(dismemExplosionHand : dismemExplosion)
{
   particleEmitter = "goreEmitter";
   debris = dismemhandDebris;
   debrisNum = 1;
   lifeTimeMS = 500;
   particleDensity = 45;
   particleRadius  = 2.5;
};
datablock ProjectileData(DismemHandProjectile : DismemExplosionProjectile)
{
 explosion = dismemExplosionHand; 
};
datablock ExplosionData(dismemExplosionLHand : dismemExplosion)
{
   debris = dismemHandLeftDebris;
   debrisNum = 1;
   lifeTimeMS = 500;
   particleDensity = 45;
   particleRadius  = 2.5;
};
datablock ProjectileData(DismemLHandProjectile : DismemExplosionProjectile)
{
 explosion = dismemExplosionLHand; 
};
datablock ParticleData(smallBloodParticle)
{
   dragCoefficient = 3;
   gravityCoefficient = 0.5;
   inheritedVelFactor = 0.3;
   constantAcceleration = 0;
   lifetimeMS         = 700;
   lifetimeVarianceMS = 250;
   textureName = "base/data/particles/dot";
   spinSpeed     = 0;
   spinRandomMin = -20;
   spinRandomMax = 20;
   colors[0] = "0.6 0 0 1";
   colors[1] = "0.5 0 0 0.9 ";
   colors[2] = "0.4 0 0 0";
   sizes[0] = 0.06;
   sizes[1] = 0.09;
   sizes[2] = 0.04;
   times[1] = 0.5;
   times[2] = 1;
   useInvAlpha = true;
};

datablock ParticleEmitterData(smallBloodEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;
   ejectionVelocity = 2;
   velocityVariance = 1.2;
   ejectionOffset   = 0;
   thetaMin = 0;
   thetaMax = 180;
   phiReferenceVel = 0;
   phiVariance     = 360;
   overrideAdvance = false;
   lifetimeMS = 3500;
   particles = "smallBloodParticle";

   uiName = "Bleed";
};

datablock ParticleData(goreParticle)
{
   dragCoefficient      = 6;
   gravityCoefficient   = 0.6;
   inheritedVelFactor   = 0.5;
   constantAcceleration = 0;
   lifetimeMS           = 1000;
   lifetimeVarianceMS   = 500;
   textureName          = "./pain";
   spinSpeed      = 0;
   spinRandomMin  = -100;
   spinRandomMax   = 100;
   colors[0]     = "1 0 0 1";
   colors[1]     = "0.8 0 0 0.9 ";
   colors[2]     = "0.5 0 0 0";
   sizes[0]      = 1;
   sizes[1]      = 1.3;
   sizes[2]      = 0.65;
   times[1] = 0.5;
   times[2] = 1;
   useInvAlpha = true;
};
datablock ParticleEmitterData(goreEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;
   ejectionVelocity = 10;
   velocityVariance = 5;
   ejectionOffset   = 0.25;
   thetaMin         = 5;
   thetaMax         = 105;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "goreParticle";

   uiName = "Gore";
};

function AIPlayer::setCrouching(%obj, %bool)
{
if(!%bool && (%obj.disLFoot || %obj.disRFoot))
{
parent::setCrouching(%obj, %bool);
}
}
Don't tell me there is useless code, i am trying to re use the collision code from my dismemberment mod.

67
Suggestions & Requests / Crouching playertype.
« on: June 13, 2016, 03:58:00 PM »
Could somebody please make a playertype where the bot's/player's shift/crouch button is jamed and cannot stand up anymore.
I need this for my gore mod and i have no experience with playertypes.

68
I need a DBS that only uses 3 sequences.
A simple double barrel with auto reloading (doesnt have to be a shotgun, it can be a railgun that has one shot and 2 sequences for reloading)

69
Drama / Jellie (BLID: 46289)
« on: May 28, 2016, 01:40:33 PM »
City rp my ass.
I have no idea what is this server, i just joined and get banned.
Screens:



70
Gallery / _OXBADCODE#'s Dismemberment thingy
« on: May 28, 2016, 11:27:12 AM »
So i made a dismemberment mod for blockland, i copied a lot of code. I made my own models.
I got through the trouble of modification help, it's almost complete. Here is a short trailer for it.

https://www.youtube.com/watch?v=ZuutmCP_AVg&feature=youtu.be

71
Modification Help / I need help with my mod.
« on: May 23, 2016, 11:06:30 AM »
I made a edited version of the dismemberment mod, and i have no clue how to add these features.

- Make this only work on bots
 
- When bot gets shot in the left or right arm, he drops the weapon (if he is holding one)

- Headshots spawn a explosion, and instantly kills the bot.

- If shot in the right or left leg, the bot must crawl for the rest of his life time.

Here is the mod http://www.mediafire.com/download/693pdg3tmpp9png/Support_RedDismemberment.zip

72
Help / My blockland keeps crashing on "loading addons"
« on: April 14, 2016, 04:00:52 PM »
loving hell.
Here is the console log.

http://pastebin.com/ZmpjC9wr

73
Suggestions & Requests / SUPERHOT Weapons. (MODELER NEEDED!)
« on: April 13, 2016, 04:54:46 PM »
Hello everybody, i am working on a SUPERHOT mod for blockland.
I need somebody to help me with modeling weapons.
I know how to animate and code, not much about modeling though.
So if anybody want to help me, PM me please.

74
Drama / Koke, random bans for no reason at all.
« on: March 23, 2016, 02:42:29 PM »
Guys i promise you i didn't do anything at all.
There isn't any chat logs or anything because i litteraly just joined the server and this happened.
All i did was join the server and got banned right away for "dis is patrik"

Very funny.
I rejoined and asked why was i banned?
Guess what happened? haha....
I got banned forever for "dont you like these servers?"

Who is this guy, what is he talking about.

/discuss

75
Suggestions & Requests / Bot help.
« on: March 13, 2016, 07:04:12 AM »
I have a giant problem with bots that do nothing else than run around and spam crap before they even realize they were supposed to attack me.

I'm talking about the default bots in blockland, and yes i tried the bot_default.

It did nothing else but look around, and didn't even want to attack me.

Is there a event or something so bots will always see you in the minigame, try to walk towards you like in the old BL and shoot when you're in the open?

So when you are behind a wall or barrier they won't spam or emote and just try to kill me?


Pages: 1 2 3 4 [5] 6 7 8