| Blockland Forums > Modification Help |
| Why is my weapon discolored and held wrong? |
| (1/2) > >> |
| TheKhoz:
For some reason, the textures are all messed up. This is not a problem with .png's or the model, as it only persisted when I edited the server.cs --- Code: (server.cs) ---//server.cs //audio datablock AudioProfile(FatmanFireSound) { filename = "./nuke_Fire.wav"; description = AudioClosest3d; preload = true; }; datablock AudioProfile(FatmanExplodeSound) { filename = "./nuke_blast.wav"; description = AudioDefault3d; preload = true; }; //muzzle flash effects datablock ParticleData(FatmanFlashParticle) { dragCoefficient = 1; gravityCoefficient = 1.5; inheritedVelFactor = 0.2; constantAcceleration = 0.0; lifetimeMS = 150; lifetimeVarianceMS = 15; textureName = "base/data/particles/star1"; spinSpeed = 10.0; spinRandomMin = -500.0; spinRandomMax = 500.0; colors[0] = "0.9 0.4 0.0 0.9"; colors[1] = "0.9 0.5 0.0 0.0"; sizes[0] = 0.25; sizes[1] = 0.0; useInvAlpha = false; }; datablock ParticleEmitterData(FatmanExplosionEmitter) { ejectionPeriodMS = 1; periodVarianceMS = 0; ejectionVelocity = 50; velocityVariance = 1.0; ejectionOffset = 0.0; thetaMin = 0; thetaMax = 0; phiReferenceVel = 0; phiVariance = 360; overrideAdvance = false; particles = "FatmanExplosionParticle"; emitterNode = TenthEmitterNode; }; datablock ParticleData(FatmanOverlayExplosionParticle) { dragCoefficient = 1; gravityCoefficient = 5; inheritedVelFactor = 0.2; constantAcceleration = 0.0; lifetimeMS = 1800; lifetimeVarianceMS = 100; textureName = "base/data/particles/star"; spinSpeed = 900.0; spinRandomMin = -50.0; spinRandomMax = 50.0; colors[0] = "0.9 0.1 0.1 0.1"; colors[0] = "0.9 0.5 0.2 0.06"; colors[0] = "0.7 0.4 0.1 0.0"; sizes[0] = 90.0; sizes[1] = 2.0; sizes[2] = 1.0; times[0] = 0.0; times[1] = 0.05; times[2] = 1.0; useInvAlpha = true; }; datablock ParticleEmitterData(FatmanOverlayExplosionEmitter) { ejectionPeriodMS = 3; periodVarianceMS = 0; ejectionVelocity = 90; velocityVariance = 0.0; ejectionOffset = 9.0; thetaMin = 0; thetaMax = 180; phiReferenceVel = 0; phiVariance = 360; overrideAdvance = false; particles = "FatmanOverlayExplosionParticle"; emitterNode = TenthEmitterNode; }; datablock ParticleData(FatmanExplosionRingParticle) { dragCoefficient = 4; gravityCoefficient = -2.5; inheritedVelFactor = 0.2; constantAcceleration = 0.0; lifetimeMS = 9350; lifetimeVarianceMS = 135; textureName = "base/data/particles/cloud"; spinSpeed = 25.0; spinRandomMin = -25.0; spinRandomMax = 25.0; colors[0] = "1 0.3 0.0 0.2"; colors[1] = "0.2 0.2 0.2 0.0"; sizes[0] = 7; sizes[1] = 11; useInvAlpha = false; }; datablock ParticleEmitterData(FatmanExplosionRingEmitter) { lifeTimeMS = 90; ejectionPeriodMS = 1; periodVarianceMS = 0; ejectionVelocity = 120; velocityVariance = 1.0; ejectionOffset = 20.0; thetaMin = 89; thetaMax = 90; phiReferenceVel = 0; phiVariance = 360; overrideAdvance = false; particles = "FatmanExplosionRingParticle"; }; datablock DebrisData(FatmanBitsDebris) { emitters = "FatmanEmitter"; lifetime = 0.1; minSpinSpeed = -300.0; maxSpinSpeed = 300.0; elasticity = 0.5; friction = 0.2; numBounces = 0; staticOnMaxBounce = true; snapOnMaxBounce = false; fade = false; gravModifier = 1; }; datablock ExplosionData(FatmanExplosion) { //explosionShape = ""; //explosionShape = "./explosionSphere1.dts"; soundProfile = FatmanExplodeSound; debris = FatmanBitsDebris; debrisNum = 90; debrisNumVariance = 0; debrisPhiMin = 0; debrisPhiMax = 360; debrisThetaMin = 0; debrisThetaMax = 180; debrisVelocity = 680; debrisVelocityVariance = 60; lifeTimeMS = 250; particleEmitter = FatmanExplosionEmitter; particleDensity = 10; particleRadius = 0.2; emitter[0] = FatmanExplosionRingEmitter; emitter[1] = FatmanOverlayExplosionEmitter; faceViewer = true; explosionScale = "1 1 1"; shakeCamera = true; camShakeFreq = "10.0 11.0 10.0"; camShakeAmp = "3.0 10.0 3.0"; camShakeDuration = 2.5; camShakeRadius = 20.0; // Dynamic light lightStartRadius = 60; lightEndRadius = 80; lightStartColor = "0.9 0.8 0.2 1"; lightEndColor = "0.3 0.1 0.0 1"; damageRadius = 25; radiusDamage = 900; impulseRadius = 49; impulseForce = 9400; }; datablock ProjectileData(FatmanProjectile) { projectileShapeName = "./Fatmanprojectile.dts"; directDamage = 160; directDamageType = $DamageType::RocketDirect; radiusDamageType = $DamageType::RocketRadius; impactImpulse = 100; verticalImpulse = 100; explosion = FatmanExplosion; particleEmitter = FatmanTrailEmitter; brickExplosionRadius = 20; brickExplosionImpact = false; //destroy a brick if we hit it directly? brickExplosionForce = 60; brickExplosionMaxVolume = 50; //max volume of bricks that we can destroy brickExplosionMaxVolumeFloating = 20; //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume) muzzleVelocity = 65; velInheritFactor = 1.0; armingDelay = 4000; lifetime = 4000; fadeDelay = 3500; bounceElasticity = 0; bounceFriction = 0; isBallistic = true; gravityMod = 1; hasLight = true; lightRadius = 5.0; lightColor = "1 0.5 0.0"; uiName = "Fat Man"; }; ////////// // item // ////////// datablock ItemData(FatmanLauncherItem) { category = "Weapon"; // Mission editor category className = "Weapon"; // For inventory system // Basic Item Properties shapeFile = "./Fatman.dts"; rotate = false; mass = 1; density = 0.2; elasticity = 0.2; friction = 0.6; emap = true; //gui stuff uiName = "Fat Man"; iconName = "./Icon_FatMan.png"; doColorShift = false; colorShiftColor = "0.0 0.0 0.0"; // Dynamic properties defined by the scripts image = FatmanLauncherImage; canDrop = true; }; //////////////// //weapon image// //////////////// datablock ShapeBaseImageData(FatmanLauncherImage) { // Basic Item properties shapeFile = "./Fatman.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.0 0.0"; 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 = BowItem; ammo = " "; projectile = FatmanProjectile; projectileType = Projectile; //casing = FatmanLauncherShellDebris; shellExitDir = "1.0 -1.3 1.0"; shellExitOffset = "0 0 0"; shellExitVariance = 15.0; shellVelocity = 7.0; //melee particles shoot from eye node for consistancy melee = false; //raise your arm up or not armReady = true; LarmReady = true; minShotTime = 4000; //minimum time allowed between shots (needed to prevent equip/dequip exploit) doColorShift = false; colorShiftColor = "0.0 0.0 0.0 0.0"; //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.2; stateTransitionOnTimeout[0] = "Ready"; stateScript[0] = "onready"; stateSound[0] = weaponSwitchSound; stateName[1] = "Ready"; stateTransitionOnTriggerDown[1] = "Fire"; stateAllowImageChange[1] = true; stateTransitionOnNoAmmo[1] = "NoAmmo"; stateSequence[1] = "Ready"; stateName[2] = "Fire"; stateTransitionOnTimeout[2] = "Smoke"; stateTimeoutValue[2] = 0.1; stateFire[2] = true; stateAllowImageChange[2] = false; stateScript[2] = "onFire"; stateWaitForTimeout[2] = true; stateEmitter[2] = FatmanFlashEmitter; stateEmitterTime[2] = 0.05; stateEmitterNode[2] = tailNode; stateSound[2] = FatmanFireSound; stateSequence[2] = "Fire"; //stateEjectShell[2] = true; stateName[3] = "Smoke"; stateEmitter[3] = FatmanLauncherSmokeEmitter; stateEmitterTime[3] = 0.05; stateEmitterNode[3] = "muzzleNode"; stateTimeoutValue[3] = 0.4; stateSequence[3] = "TrigDown"; stateTransitionOnTimeout[3] = "CoolDown"; stateName[5] = "CoolDown"; stateTimeoutValue[5] = 1.3; stateTransitionOnTimeout[5] = "Reload"; stateSequence[5] = "TrigDown"; stateName[4] = "Reload"; stateTransitionOnTriggerUp[4] = "Ready"; stateSequence[4] = "TrigDown"; stateName[6] = "NoAmmo"; stateTransitionOnAmmo[6] = "Ready"; }; function FatmanLauncherImage::onMount(%this,%obj,%slot) { Parent::onMount(%this,%obj,%slot); %obj.playThread(0, armreadyboth); } function FatmanLauncherImage::onUnMount(%this,%obj,%slot) { Parent::onMount(%this,%obj,%slot); %obj.playThread(0, root); } --- End code --- I would like to know: 1) What could cause any discoloration? 2) What values to lower for a smaller explosion. |
| Julius The 1st:
Why does this remind me of the Ion Cannon's script? |
| -Jetz-:
Try reading the error messages. |
| NEkram:
on the states you are putting datablocks that DON'T exist. |
| TheKhoz:
--- Quote from: Julius The 1st on November 14, 2010, 11:28:46 PM ---Why does this remind me of the Ion Cannon's script? --- End quote --- It is an edit of the Mini-Nuke, but is supposed to be way less powerful. --- Quote from: -Jetz- on November 15, 2010, 06:09:38 PM ---Try reading the error messages. --- End quote --- I don't know how to fix it, is the problem. --- Quote from: NEkram on November 15, 2010, 06:13:57 PM ---on the states you are putting datablocks that DON'T exist. --- End quote --- I realize that, but I can't see any way to fix it. |
| Navigation |
| Message Index |
| Next page |