Milkshape.

Author Topic: Milkshape.  (Read 3428 times)

I'm making a blaster for retail and have two problems. One, seams have opened up in the model and look kind of nasty. Two, I'm using the textures from the add-ons folder and they don't show up. It's only the dark grey. I had "real" textures but I want more blocky ones. I have the grey75.png for the body and the grey50.png for the details.

You need to Flat shaded the models for the Blocko feel.

How to do it:
Coming Soon when I get around to it =P

Oh and I have a diffrent one. When this other one fires it makes a noise, that's bad. Where do i kill it?  The noise.
« Last Edit: May 30, 2007, 04:34:14 PM by Naes Draw »

Go into the script and Ctrl+F .wav, should find the sound files.

Where? I thunked I got them, but still has the noise.

//flashlight.cs


//flashlight trail effects
datablock ParticleData(flashlightTrailParticle)
{
   dragCoefficient      = 0;
   gravityCoefficient   = -0.0;
   inheritedVelFactor   = 60.0;
   constantAcceleration = 10.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.3 0.3 0.9 0.4";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 2;
   sizes[1]      = 1;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flashlightTrailEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = false;
   particles = "flashlightTrailParticle";
};


datablock ParticleData(flashlightExplosionRingPartic le)
{
   dragCoefficient      = 8;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 300;
   lifetimeVarianceMS   = 100;
   textureName          = "";
   spinSpeed      = 0.0;
   spinRandomMin      = 0.0;
   spinRandomMax      = 0.0;
   colors[0]     = "1 1 0.0 0.9";
   colors[1]     = "0.9 0.0 0.0 0.0";
   sizes[0]      = 0;
   sizes[1]      = 0;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flashlightExplosionRingEmitte r)
{
   lifeTimeMS = 50;

   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = o;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = false;
   particles = "flashlightExplosionRingPartic le";
};

datablock ExplosionData(flashlightExplosion)
{
   //explosionShape = "";
   soundProfile = flashlightHitSound;

   lifeTimeMS = 150;

   particleEmitter = flashlightExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   emitter[0] = flashlightExplosionRingEmitte r;

   faceViewer     = true;
   explosionScale = "0 0 0";

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 3;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";
   
   impulseRadius = 0;
   impulseForce = 0;
   impactImpulse      = 0;
   verticalImpulse      = 0;

};


AddDamageType("flashlight",   '<bitmap:add-ons/ci/generic> %1',    '%2 <bitmap:add-ons/ci/generic> %1',1,1);
datablock ProjectileData(flashlightProjectile)
{
   //projectileShapeName = "";
   directDamage        = 0;
   impactImpulse       = 0;
   verticalImpulse     = 0;
   impulseRadius = 0;
   impulseForce = 0;
   impactImpulse      = 0;
   verticalImpulse      = 0;
   explosion           = flashlightExplosion;
   //particleEmitter     = as;

   muzzleVelocity      = 999999999;
   velInheritFactor    = 500;

   armingDelay         = 0;
   lifetime            = 2000;
   fadeDelay           = 90;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod = 0.0;

   hasLight    = true;
   lightRadius = 25.0;
   lightColor  = "0 0 0.30";
};

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

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

   //gui stuff
   uiName = "Flashlight";
   iconName = "./ItemIcons/flashlight";
   doColorShift = false;
   colorShiftColor = "1 1 1 1.000";

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

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(flashlightImage)
{
   // Basic Item properties
   shapeFile = "./shapes/flashlight.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;
   rotation = eulerToMatrix( "0 0 10" );

   // 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 = flashlightItem;
   ammo = " ";
   projectile = flashlightProjectile;
   projectileType = Projectile;

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

   doColorShift = false;
   colorShiftColor = flashlightItem.colorShiftColo r;//"0.400 0.196 0 1.000";

   //casing = " ";

   // 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.01;
   stateTransitionOnTimeout[0]       = "Ready";
   stateSound[0]               = weaponSwitchSound;

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

   stateName[2]                    = "Fire";
   stateTransitionOnTimeout[2]     = "Smoke";
   stateTimeoutValue[2]            = 0.00000;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Fire";
   stateScript[2]                  = "onFire";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]               = flashlightFlashEmitter;
   stateEmitterTime[2]            = 0.0001;
   stateEmitterNode[2]            = "muzzleNode";
        stateEjectShell[2]       = true;

   stateName[3] = "Smoke";
   stateEmitter[3]               = flashlightSmokeEmitter;
   stateEmitterTime[3]            = 0.0001;
   stateEmitterNode[3]            = "muzzleNode";
   stateTimeoutValue[3]            = 0.00000;
   stateTransitionOnTimeout[3]     = "Reload";
   
   stateName[4]         = "Check";
   stateTransitionOnTriggerUp[4]   = "StopFire";
   stateTransitionOnTriggerDown[4]   = "Fire";

   stateName[5]                    = "StopFire";
   stateTransitionOnTimeout[5]     = "Ready";
   stateTimeoutValue[5]            = 0.00000;
   stateAllowImageChange[5]        = false;
   stateWaitForTimeout[5]      = true;
   //stateSequence[5]                = "Reload";
   stateScript[5]                  = "onStopFire";

};

datablock ExplosionData(flashlightExplosion)
{
   //explosionShape = "";
   soundProfile = flashlightHitSound;

   lifeTimeMS = 150;

   particleEmitter = flashlightExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   emitter[0] = flashlightExplosionRingEmitte r ;

   faceViewer     = true;
   explosionScale = "0 0 0";

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 3;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";
   
   impulseRadius = 0;
   impulseForce = 0;
   impactImpulse      = 0;
   verticalImpulse      = 0;

};

datablock ExplosionData(flashlightExplosion)
{
   //explosionShape = "";
   

   lifeTimeMS = 150;

   particleEmitter = flashlightExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;
d it doesn't let the flashlight work...
Where is that profile? that's what I need to mod.
I got rid of it. the flashlight is way better, BUT the noise is still there.
« Last Edit: May 31, 2007, 09:15:58 AM by Naes Draw »

When your in the script Ctrl+F then type soundProfile then Find nest it should take you right too it.

For the love of god use
Code: [Select]
For scripts so I can see your text with out getting confused.

Code: [Select]
//audio
datablock AudioProfile(flashlightFireSound)
{
   filename    = "./sound/";
   description = AudioClosest3d;
   preload = true;
};

datablock AudioProfile(flashlightExplodeSound)
{
   filename    = "./sound/";
   description = AudioDefault3d;
   preload = true;
};

Where do i set up the datablocks? You have the whole script.
I mean where do I call the blocks.
Still doesn't look like that is it.
« Last Edit: May 31, 2007, 01:58:36 PM by Naes Draw »

Any ideas?
Oh, and does anyone know the mountpoint for the head? To place a joint on a hat.

$HeadSlot

$BackSlot also exists.

These aren't just in RTB, since they are used for things like Emotes on your head.

$HeadSlot

$BackSlot also exists.

These aren't just in RTB, since they are used for things like Emotes on your head.
So I can put that joint on a hat model?

$HeadSlot

$BackSlot also exists.

These aren't just in RTB, since they are used for things like Emotes on your head.
So I can put that joint on a hat model?
No, it's not the joint name. It's the name of a mountpoint of the head.

So going

%client.mountimage(lolhat, $Headslot);

Would theoretically mount a hat on your head..

%client.player.mountimage(lolhat, $Headslot);

Add a joint on the hat model itself called "mountPoint" or just have the part where you want the hat to be on at (0,0,0) and not add any mount joints.