Poll

Feedback

Great
66 (65.3%)
Good
17 (16.8%)
Ok
7 (6.9%)
All right
4 (4%)
Not for me
7 (6.9%)

Total Members Voted: 99

Author Topic: Lego Weapons Pack  (Read 23449 times)

Those are very lovey light sabers, good work.
Thank you, next project is wookie crossbow that you click once to fire a single projectile and hold and release to fire multiple projectiles, like the old one from jedi knight acadamy.
« Last Edit: August 05, 2009, 06:32:54 PM by Dalek »

When are they approximatly gonna be released? Also, I prefer the "old school-bacward megaphone" gun. But that's just me :P

ya that is the real lego blaster

When are they approximatly gonna be released? Also, I prefer the "old school-bacward megaphone" gun. But that's just me :P
Not sure yet


Did he stated they would reflect projectiles?
Lego red lightsaber is done, i tried making it so it reflected projectiles but it kept reflecting its own projectile.
Yes, yes he did.

Yes, yes he did.
Ahem....Sorry then. :D
I was too lazy to read it all again...

It's cool :D
If you need any help "coding" it let me know Dalek.

It's cool :D
If you need any help "coding" it let me know Dalek.
What have you coded before? I dont dl that many add-ons so i would like to know.

Lego red lightsaber is done, i tried making it so it reflected projectiles but it kept reflecting its own projectile.
I know how to fix that.


I'd need to see the code, but check the datablock and see if it's the Light sabers Projectile datablock, and if not, reflect it.

Code: [Select]
//lrls.cs
datablock AudioProfile(lrlsDrawSound)
{
   filename    = "./lrlsDraw.wav";
   description = AudioClosest3d;
   preload = true;
};
datablock AudioProfile(lrlstuffSound)
{
   filename    = "./lrlstuff.wav";
   description = AudioClosest3d;
   preload = true;
};
datablock AudioProfile(lrlsLoopSound)
{
   filename    = "./lrlsLoop.wav";
   description = AudioCloseLooping3d;
   preload = true;
};
datablock AudioProfile(lrlSwingSound)
{
   filename    = "./lrlsSwing.wav";
   description = AudioClosest3d;
   preload = true;
};



//effects
datablock ParticleData(lrlloveplosionParticle)
{
   dragCoefficient      = 2;
   gravityCoefficient   = 1.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   spinRandomMin = -90;
   spinRandomMax = 90;
   lifetimeMS           = 500;
   lifetimeVarianceMS   = 300;
   textureName          = "./spark";
   colors[0]     = "1.0 0.9 0.0 0.9";
   colors[1]     = "0.9 0.8 0.0 0.0";
   sizes[0]      = 0.2;
   sizes[1]      = 0.1;
};

datablock ParticleEmitterData(lrlloveplosionEmitter)
{
   ejectionPeriodMS = 4;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 60;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "lrlloveplosionParticle";

   uiName = "LEGO Green Lightsaber Hit";
};

datablock ExplosionData(lrlloveplosion)
{
   //explosionShape = "";
   lifeTimeMS = 300;

   soundProfile = lrlstuffSound;

   particleEmitter = lrlloveplosionEmitter;
   particleDensity = 8;
   particleRadius = 0.2;

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

   shakeCamera = true;
   camShakeFreq = "20.0 22.0 20.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 0;
   lightStartColor = "1.0 0.0 0.0 0.8";
   lightEndColor = "0.8 0.0 0.0 0.5";
};


//projectile
AddDamageType("lrls",   '<bitmap:add-ons/Pack_LEGOweapons/CI_lrls> %1',    '%2 <bitmap:add-ons/Pack_LEGOweapons/CI_lrls> %1',0.75,1);
datablock ProjectileData(lrlsProjectile)
{
   directDamage        = 40;
   directDamageType  = $DamageType::lrls;
   radiusDamageType  = $DamageType::lrls;
   explosion           = lrlloveplosion;
   //particleEmitter     = as;

   muzzleVelocity      = 50;
   velInheritFactor    = 1;

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

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1.0 0 0 0.5";

   uiName = "LEGO Red Lightsaber Slice";
};


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

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

//gui stuff
uiName = "LEGO Red Lightsaber";
iconName = "./icon_lrls";
doColorShift = false;
colorShiftColor = "0.471 0.471 0.471 1.000";

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

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(lrlsImage)
{
   // Basic Item properties
   shapeFile = "./lrls.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 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 = "0 0 0";

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

   // Projectile && Ammo.
   item = lrlsItem;
   ammo = " ";
   projectile = lrlsProjectile;
   projectileType = Projectile;

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

   //casing = " ";
   doColorShift = true;
   colorShiftColor = "0.471 0.471 0.471 1.000";

   // 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";
stateSound[0]                    = lrlsDrawSound;
stateSequence[0] = "Activate";

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "PreFire";
stateAllowImageChange[1]         = true;
stateSound[1] = lrlsLoopSound;

stateName[2] = "PreFire";
stateScript[2]                  = "onPreFire";
stateAllowImageChange[2]        = false;
stateTimeoutValue[2]            = 0.2;
stateTransitionOnTimeout[2]     = "Fire";
stateSound[2] = lrlsLoopSound;

stateName[3]                    = "Fire";
stateTransitionOnTimeout[3]     = "CheckFire";
stateTimeoutValue[3]            = 0.2;
stateFire[3]                    = true;
stateAllowImageChange[3]        = false;
stateSequence[3]                = "Fire";
stateScript[3]                  = "onFire";
stateWaitForTimeout[3] = true;
statesound[3] = lrlSwingSound;

stateName[4] = "CheckFire";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";
stateSound[4] = lrlsLoopSound;


stateName[5]                    = "StopFire";
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.2;
stateAllowImageChange[5]        = false;
stateWaitForTimeout[5] = true;
stateSequence[5]                = "StopFire";
stateScript[5]                  = "onStopFire";
stateSound[5] = lrlsLoopSound;

};

function lrlsImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack);
}

function lrlsImage::onStopFire(%this, %obj, %slot)
{
%obj.playthread(2, root);
}

You have some serious free time if you gonna make that all... Only the star wars weapons are going to take while.. :O
I'll make something if ye get me a picture of it.
You can google the weapons, but i can help you and search some...
What weapons do you want else Dalek, i'll post the reference pics if you want..
« Last Edit: August 08, 2009, 07:31:07 AM by lordician »

I GOTS AN IDEA FOR WHIP!

OnProjectileTouch(?)>Player>AddVelocity 0 10 5

That would be perfect!