Forums Index >> Modding >> Weapon Script for rocket mod



Page : <1> :


Here is the weapon script I used for my rocket mod. Be sure to put the emitter data in the right place.

Lightprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Lightprojectile.damage = 100;
Lightprojectile.count = 40;
Lightprojectile.burstcount = 3;
Lightprojectile.gravityscale = 0.1;
Lightprojectile.velocity = 40;
Lightprojectile.sizescale = 2;
Lightprojectile.reloadtime = 500;
Lightprojectile.burstdelay = 3000;
Lightprojectile.inheritVelocity = 0;
Lightprojectile.tankExplosion = "RockExplosion";
Lightprojectile.tankExplosion = "ownRockExplosion";
Lightprojectile.otherExplosion = "RockExplosion";
LightTank.defaultprojectile.emitter= "projectile2emitter";

Mediumprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Mediumprojectile.damage = 100;
Mediumprojectile.count = 40;
Mediumprojectile.burstcount = 3;
Mediumprojectile.gravityscale = 0.1;
Mediumprojectile.velocity = 40;
Mediumprojectile.sizescale = 2;
Mediumprojectile.reloadtime = 500;
Mediumprojectile.burstdelay = 3000;
Mediumprojectile.inheritVelocity = 0;
Mediumprojectile.tankExplosion = "RockExplosion";
Mediumprojectile.owntankExplosion = "RockExplosion";
Mediumprojectile.otherExplosion = "RockExplosion";
MediumTank.defaultprojectile.emitter= "projectile2emitter";

Heavyprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Heavyprojectile.damage = 100;
Heavyprojectile.count = 40;
Heavyprojectile.burstcount = 3;
Heavyprojectile.gravityscale = 0.1;
Heavyprojectile.velocity = 40;
Heavyprojectile.sizescale = 2;
Heavyprojectile.reloadtime = 500;
Heavyprojectile.burstdelay = 3000;
Heavyprojectile.inheritVelocity = 0;
Heavyprojectile.tankExplosion = "RockExplosion";
Heavyprojectile.ownTankExplosion = "RockExplosion";
Heavyprojectile.otherExplosion = "RockExplosion";
HeavyTank.defaultprojectile.emitter= "projectile2emitter";

EMITTER:

Datablock particledata(projectile2particle)
{
animateTexture = "1";
colors[0] = "0.4 1 0 1";
colors[1] = "1 0 0 1";
colors[2] = "0 0.2 0.2 0.99";
colors[3] = "0 0 0 0";
colors[4] = "0 0 0 0";
constantAcceleration = "0";
dragCoefficient = "20";
framesPerSec = "1";
gravityCoefficient = "0";
inheritedVelFactor = "-2";
lifetimeMS = "1000";
lifetimeVarianceMS = "100";
sizes[0] = "3";
sizes[1] = "0.5";
sizes[2] = "0.75";
sizes[3] = "1";
sizes[4] = "2";
spinRandomMax = "5000";
spinRandomMin = "-90";
spinSpeed = "10";
textureName = "game/data/shapes/custom/smoke.png";
times[0] = "0.04";
times[1] = "0.02";
times[2] = "0.2";
times[3] = "1";
times[4] = "100";
useInvAlpha = "1";
windCoefficient = "1";
};
//
datablock particleemitterdata(projectile2emitter)
{
className = "ParticleEmitterData";
ejectionOffset = "0";
ejectionPeriodMS = "7";
ejectionVelocity = "5";
lifetimeMS = "0";
lifetimeVarianceMS = "0";
orientOnVelocity = "0";
orientParticles = "0";
overrideAdvance = "0";
particleFarDist = "1000";
particles = "projectile2particle";
periodVarianceMS = "0";
phiReferenceVel = "0";
phiVariance = "360";
thetaMax = "90";
thetaMin = "90";
useEmitterColors = "0";
useEmitterSizes = "0";
velocityVariance = "0";
};
datablock ParticleEmitterNodeData(projectile2emitternode)
{
timeMultiple = 80;
};

Tuesday, January 18, 2005 at 6:28:21 PM

Well, here is a upgrade I just finished:

Lightprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Lightprojectile.damage = 100;
Lightprojectile.count = 20;
Lightprojectile.burstcount = 3;
Lightprojectile.gravityscale = 0.1;
Lightprojectile.velocity = 40;
Lightprojectile.sizescale = 2;
Lightprojectile.reloadtime = 500;
Lightprojectile.burstdelay = 3000;
Lightprojectile.saveOldCartridge = false;
Lightprojectile.canSave = false;
Lightprojectile.splashArea = 1.2;
Lightprojectile.inheritVelocity = 0;
LightTank.defaultprojectile.emitter= "projectile2emitter";

Defaultprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Defaultprojectile.damage = 100;
Defaultprojectile.count = 30;
Defaultprojectile.burstcount = 4;
Defaultprojectile.gravityscale = 0.1;
Defaultprojectile.velocity = 40;
Defaultprojectile.sizescale = 2;
Defaultprojectile.reloadtime = 500;
Defaultprojectile.burstdelay = 3000;
Defaultprojectile.inheritVelocity = 0;
Defaultprojectile.saveOldCartridge = false;
Defaultprojectile.canSave = false;
Defaultprojectile.splashArea = 1.2;
MediumTank.defaultprojectile.emitter= "projectile2emitter";

Heavyprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Heavyprojectile.damage = 100;
Heavyprojectile.count = 40;
Heavyprojectile.burstcount = 5;
Heavyprojectile.gravityscale = 0.1;
Heavyprojectile.velocity = 40;
Heavyprojectile.sizescale = 2;
Heavyprojectile.reloadtime = 500;
Heavyprojectile.burstdelay = 3000;
Heavyprojectile.inheritVelocity = 0;
Heavyprojectile.saveOldCartridge = false;
Heavyprojectile.canSave = false;
Heavyprojectile.splashArea = 1.2;
HeavyTank.defaultprojectile.emitter= "projectile2emitter";

DefaultExplosion.sound.filename = "game/data/sound/explode.ogg";
DefaultExplosion.resource = "game/data/shapes/custom/explode.png";
DefaultExplosion.startscale = 1;
DefaultExplosion.endscale = 6;
DefaultExplosion.durationscale = 200;

 

Last edited: Thursday, January 20, 2005 at 8:55:01 AM

Thursday, January 20, 2005 at 8:52:41 AM

Here are some pictures:

Picture 1 (184 kb) www.yoggy.mcubedsw.com/PostPics/Rockets1.jpg

Picture 2 (184 kb) www.yoggy.mcubedsw.com/PostPics/Rockets2.jpg

Picture 3 (188 kb) www.yoggy.mcubedsw.com/PostPics/Rockets3.jpg

Last edited: Thursday, January 20, 2005 at 10:31:11 AM

Thursday, January 20, 2005 at 10:30:34 AM

For bongobongo:

Here is how to make a mod like mine.

I used TT1_1.mis for my mod.

First, here is how the bottom of your mission file should look:

//--- OBJECT WRITE END ---

Lightprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Lightprojectile.damage = 100;
Lightprojectile.count = 20;
Lightprojectile.burstcount = 3;
Lightprojectile.gravityscale = 0.1;
Lightprojectile.velocity = 40;
Lightprojectile.sizescale = 2;
Lightprojectile.reloadtime = 500;
Lightprojectile.burstdelay = 3000;
Lightprojectile.saveOldCartridge = false;
Lightprojectile.canSave = false;
Lightprojectile.splashArea = 1.2;
Lightprojectile.inheritVelocity = 0;
LightTank.defaultprojectile.emitter= "projectile2emitter";

Defaultprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Defaultprojectile.damage = 100;
Defaultprojectile.count = 30;
Defaultprojectile.burstcount = 4;
Defaultprojectile.gravityscale = 0.1;
Defaultprojectile.velocity = 40;
Defaultprojectile.sizescale = 2;
Defaultprojectile.reloadtime = 500;
Defaultprojectile.burstdelay = 3000;
Defaultprojectile.inheritVelocity = 0;
Defaultprojectile.saveOldCartridge = false;
Defaultprojectile.canSave = false;
Defaultprojectile.splashArea = 1.2;
MediumTank.defaultprojectile.emitter= "projectile2emitter";

Heavyprojectile.resource = "game/data/shapes/custom/superSpeed.dts";
Heavyprojectile.damage = 100;
Heavyprojectile.count = 40;
Heavyprojectile.burstcount = 5;
Heavyprojectile.gravityscale = 0.1;
Heavyprojectile.velocity = 40;
Heavyprojectile.sizescale = 2;
Heavyprojectile.reloadtime = 500;
Heavyprojectile.burstdelay = 3000;
Heavyprojectile.inheritVelocity = 0;
Heavyprojectile.saveOldCartridge = false;
Heavyprojectile.canSave = false;
Heavyprojectile.splashArea = 1.2;
HeavyTank.defaultprojectile.emitter= "projectile2emitter";

DefaultExplosion.sound.filename = "game/data/sound/explode.ogg";
DefaultExplosion.resource = "game/data/shapes/custom/explode.png";
DefaultExplosion.startscale = 1;
DefaultExplosion.endscale = 6;
DefaultExplosion.durationscale = 200;

Heres the top:

Exec("game/server/scripts/emitters.cs");
//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
musicTrack = "Lush";

New ScriptObject(MissionInfo) {
name = "Rockets";

Now, if you have that, all you need to do is copy the emitter data (first post) and put it in a emitters.cs file.

To get it, go to the inside of your thinktanks application and follow this path: Contents/Resources/game/server/scripts. Now open a text editor and paste the emitter codes in it now save it as "emitters" inside Contents/Resources/game/server/scripts or save it anywhere and then move it there. Once that is in place, add.cs to the end of its name. (not emitters.txt.cs, just emmiters.cs).

There you go! If you start thinktanks now, you can play your new mod.

And with this knowlege you can make just about any kind of wepon for a mod by setting all the codes to anything you want.

Thursday, January 20, 2005 at 12:17:02 PM

THANK ALOT GUY, YOU ARE A FRIENDLY GUY ;)

Thursday, January 20, 2005 at 1:15:02 PM

Yoggy, Your Rocket mod is cool.

Darn my emitters either crashes my TT or won't come out from cannon... :( Try,Try,Try again...Or then I can edit special.cs emitters or...

Anyways Yoggy your mod is nice.

EDIT: Not mod; weapon. I think you didn't used ModWizard you only changed the weapons.

Last edited: Saturday, January 22, 2005 at 5:33:35 AM

Saturday, January 22, 2005 at 5:24:55 AM

Ah, and thanks for the emitter and changes to DefaultProjectile :).

Saturday, January 22, 2005 at 5:32:02 AM

The SuperSpeed thingy's from MarbleBlast.

Friday, January 28, 2005 at 1:20:30 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald