Coding Knowledge Author: Lt Eartworm Projectile Types EnergyProjectile this is what the blaster uses. The only unique things about it is that it bounces around, and you can add a gravityMod to it, making it act like a grenade. oh, and the blur. this projectile can also have a damage radius. you can also use shape files for this projectile, but they look distorted(what do i mean "look"? they ARE distorted). also, the faster the velocity of the shot, the farther away it bounces. also great for sniper weapons because this is the only other projectile other than the lasers that hits in the middle of the reitcle. LinearProjectile This is what the Spinfusor uses. you can use any .dts shape for this projectile. you can also scale it. just add the line scale = "1 1 1"; and you can change the numbrs to scale it. this projecile explodes upon impact. using this projectile is the easiest way to make a dumbfire missile. LinearFlareProjectile this is what the plasma rifle uses. you can uses shapes for it to, but you dont have to. if you want a different color, modify this line: flareColor = "0 1 0"; and also make sure you arent using a shape file. you can use any texture for the flaremodtexture and flarebasetexture. GrenadeProjectile both the mortar and grenade launcher use this. it natually archs downward when shot, but you can modify that with gravityMod. it also takes a certain amount of time before it will detonate. ElfProjectile hmm... not much of anything on this one. i can explain some of the datablock. BeamRange is how far away you can "ELF" people at. restorativeFactor dragFactor endFactor randForceFactor randForceTime i don't know what these do. drainEnergy how fast the energy drains when you are being shot at. drainHealth Yes! the ELF gun can actually do damage! set this to a nice small number. 1.0 kills people the instant their energy is drained. mainBeamWidth = 0.1; // width of blue wave beam mainBeamSpeed = 9.0; // speed that the beam travels forward mainBeamRepeat = 0.25; // number of times the texture repeats lightningDist = 1; // distance of lightning from main beam these are explained within the file itself. lightninwidth is selfexplainatory. TracerProjectile not relly sure. my guess is that its similar to a linear projectile. it shouldn't be all that difficult to mess wiht. i might do something with it. To be continued yet again... Flareprojectile I'm going to research this one. i'm sure i can get a weapon to attract missiles AND do damage. hehe. *evil laugh* Function Issues? Have a function that isn't working, but you think the code is good? Well, then try giving it a shpebase function: function BurnObject(%obj) { if(!isObject(%obj)) { echo("NO position for function: BurnObject(%obj)"); } %fire = new ParticleEmissionDummy() { position = %obj.getWorldBoxCenter(); rotation = "1 0 0 0"; dataBlock = "defaultEmissionDummy"; lockCount = "0"; homingCount = "0"; emitter = "FireDamageEmitter"; velocity = "1"; }; MissionCleanup.add(%fire); %fire.schedule(500, "delete"); } function ShapeBase::BurnObject(%obj) { BurnObject(%obj); } Now, you can call this function for anything, player, vehicles, and statics. Weapon Datablocks For any one that has a lot of trouble putting in a weapon (mainly newbs. this happened to me when i started and I figured it out last week) in yourweapon.cs, the itemdata name is the name you use to refer to this weapon in other files. Example: datablock ItemData(Disc) // name you use in other files { className = Weapon; catagory = "Spawn Items"; shapeFile = "weapon_disc.dts"; image = DiscImage; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; pickUpName = "a spinfusor"; emap = true; }; For this weapon this you will use disc. datablock ItemData(mouse) { className = Weapon; catagory = "Spawn Items"; shapeFile = "weapon_disc.dts"; image = DiscImage; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; pickUpName = "a spinfusor"; emap = true; }; For this weapon you would use mouse. datablock ItemData(YoDaddysUncle) // not meant to be offending, trying to make a point { className = Weapon; catagory = "Spawn Items"; shapeFile = "weapon_disc.dts"; image = DiscImage; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; pickUpName = "a spinfusor"; emap = true; }; In this weapon, you would use YoDaddysUncle. I think you get it now.