Page 1 of 3

TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Sun Feb 24, 2008 4:00 pm
by benblue20
Hello,

This is a thread concerning the making of a weapon and an emitter. So lets get started.

How to make a weapon

1. Download the source files

2. There is a file named special.cs, put it in boot drive/program files/ThinkTanks/game/server/scripts small note: the directory may be different in versions (i.e shockwave, garagegames, etc.)

3. If the special.cs you extracted is not a text file, right click on the file and go to properties. Click on the 'change' button and either pick Notepad or any other text program you like (I use notepad just to say).

4. To make a new weapon, copy a sample BraveTree made:

Image

5. Once you copied, paste it anywhere you like, easier if you paste it below it:

Image

6. You can change the name of the projectile. I named mine TestProjectile (you do not need the word 'Projectile' at the end). You can name the projectile anything you want (i.e. fireball, lazer, plasma, etc.)

7. Edit the numbers to your liking.

8. To implement your newly made weapon, place it in the power-up slot (scroll 9/10 way down to find it). Make sure you change the first number everytime you place a newly made PU (power-up). In addition, for every PU you place, change the number beside it as well! Finally, the sound that comes when you pick your PU.

Image

9. Done!

How to make an emitter

1. Special.cs is needed.
2. Begin by taking a copying a sample of BraveTree's emitters:

Image

3. Paste it anywhere you like. Easier to paste it right below it.

Image

4. I named mine 'fire'. The second one you just name it fireEmitter (DO NOT leave out 'Emitter' on the second name). Finally, for the third name, name it the way you did on your first one.

5. Edit the numbers to your liking.

6. Going back to your newly made weapon, implement the emitter like so:

Image

7. Done!

Any questions/concerns please post in this thread.

Thanks for reading and I hope this helps folks.

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Tue Mar 11, 2008 3:34 pm
by deathbotXPBMTXDL
Ty ben it help me alot Gj :wink: but so much to read lol :study:

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Mon Jun 23, 2008 2:32 am
by luke
Hi. i'm new. i just created a new weapon. but it seems i never get it. heres what i did.

Code: Select all

datablock ProjectileData(Superb)
{
   velocity = 40.0;           // meters per second
   inheritVelocity = 1.00;    // how much of shooters velocity to inherit
   numBounce = 0;             // usually 0
   splashArea = 20;          // usually 0
   count = 3;                // how many shots per clip?
   saveOldCartridge = true;   // chuck old cartridge or keep it around
   canSave = false;           // can this cartridge be saved if another comes along?
   reloadTime = 1000;         // in milliseconds
   burstDelay = 1000;         // milliseconds until next burst if button held down
   burstCount = 1;            // number of projectiles to fire per burst
   synchTime = 1000;          // synch over this many milliseconds
   synchBefore = 500;         // synch if not older than this in milliseconds
   damage = 20;                // usually 1
   gravityScale = 0.5;        //
   sizeScale = 0.7;           // scale of projectile (meters for bitmaps)
   resource = "~/data/shapes/tanks/AreaProjectile.png";             // shape or bitmap
   tankExplosion = "SplashExplosion";   // datablock for explosion
   ownTankExplosion = "SplashExplosion";   // datablock for explosion
   bounceExplosion = "DefaultExplosion"; // datablock for explosion
   otherExplosion = "SplashExplosion";  // datablock for explosion
   reticle = "OtherReticle";
};

Code: Select all

$NumPupTypes = 4;
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
$pupTypes[3] = "Superb";

$pupSnds[0] = "ActivateSpeedy";
$pupSnds[1] = "ActivateBounce";
$pupSnds[2] = "ActivateSplash";
$pupSnds[3] = "ActivateSplash";

any mistakes? do i NEED a emitter? if so both making emitters and weps sounds very simple.

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Thu Jul 17, 2008 5:29 pm
by Richu
deathbotXPBMTXDL wrote:Ty ben it help me alot Gj :wink: but so much to read lol :study:


:sneaky: :innocent: :nope: :chair: :chair: :chair: :chair: :chair: :chair: :chair: :chair: :chair: :soldiers: :soldiers: :deadhorse: :deadhorse: :dj: :dj: :morepics: :adminlock: :RIP: :banana: :banana: :occasion9: :angry7: :angry5: :flaming: :pain10: :newb: :o :!: :zout: :zout: :bash: :censored: :banana: -_-
help me omg :drive: :tankergang: :tankertank: :cya: underdog :cya: :cya: :bs: :rtfm: :rtfm: :rtfm: :rtfm: :rtfm: :rtfm: yep i said idk how help me :please: :rtfm: :rtfm: :rtfm: :rtfm: :rtfm:

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Thu Jul 17, 2008 9:32 pm
by DJ Wings
...Excuse me? :tankerconfused2:

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Tue Jul 22, 2008 3:23 pm
by Guest
i just created a new weapon. but it seems i never get it.


Luke a way to get your weapon on your server is to create a Projectile Code with dash admin script or ACAS.
To do this you need Dash or ACAS (I would go with dash if your new to modding).

after you download and install dash go to codes.cs.

Scroll Down untill you find:

Code: Select all

else if (%code $= "/blue" )
        call("teamchanger",%sender,"BlueTeam");
    else if (%code $= "/mb" )
        call("adminteamchanger",%sender,"BlueTeam",%a2);
    else if (%code $= "/mo" )
        call("makePlayerObserver",%sender,%a2);
    else if (%code $= "/mg" )
        call("adminteamchanger",%sender,"GreenTeam",%a2);
    else if (%code $= "/mr" )
        call("adminteamchanger",%sender,"RedTeam",%a2);
    else if (%code $= "/ufo" )
        call("tankchanger",%sender,"babyboss");
    else if (%code $= "/light" )
        call("tankchanger",%sender,"LightTank");
    else if (%code $= "/med" )
        call("tankchanger",%sender,"MediumTank");
    else if (%code $= "/heavy" )
        call("tankchanger",%sender,"HeavyTank");
    else if (%code $= "/boss" )
        call("tankchanger",%sender,"BossTank");
    else if (%code $= "/mufo" )
        call("admintankchanger",%sender,%a2,"babyboss");
    else if (%code $= "/mlight" )
        call("admintankchanger",%sender,%a2,"LightTank");
    else if (%code $= "/mmed" )
        call("admintankchanger",%sender,%a2,"MediumTank");
    else if (%code $= "/mheavy" )
        call("admintankchanger",%sender,%a2,"HeavyTank");
    else if (%code $= "/mboss" )
        call("admintankchanger",%sender,%a2,"BossTank");
    else if (%code $= "/area" )
        call("projectilechanger",%sender,"SplashProjectile");
    else if (%code $= "/speedy" )
        call("projectilechanger",%sender,"SpeedyProjectile");
    else if (%code $= "/bounce" )
        call("projectilechanger",%sender,%a2,"BounceProjectile");
    else if (%code $= "/marea" )
        call("adminprojectilechanger",%sender,%a2,"SplashProjectile");
    else if (%code $= "/mspeedy" )
        call("adminprojectilechanger",%sender,%a2,"SpeedyProjectile");
    else if (%code $= "/mbounce" )
        call("adminprojectilechanger",%sender,%a2,"BounceProjectile");
    else if (%code $= "/restart" )
        call("restartGame",%sender);
    else


After you do that put this at the end of the list:

else if (%code $= "/code" )
call("projectilechanger",%sender,"YourProjectile");

Replace where it says code with what ever you want the code to be then replace YourProjectile with the name of your Projectile in the special.cs.


Hope This Helps,

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Wed Jul 23, 2008 10:52 pm
by bobo man
thanks pink but how do u do that on acas? :thanks:

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Thu Jul 24, 2008 1:15 am
by Guest
For ACAS Just instead of opening codes.cs just open AdminCodes.cs and scroll down to where it says:


Code: Select all

}

  else if(%code $= "/area")
  {
    if(IsAdmin(%sender,"You're not an admin"))
      admprojectilechanger(%sender,%msg,"SplashProjectile");
    return;
  }
  else if(%code $= "/speedy")
  {
    if(IsAdmin(%sender,"You're not an admin"))
      admprojectilechanger(%sender,%msg,"SpeedyProjectile");
    return;
  }
  else if(%code $= "/bounce")
  {
    if(IsAdmin(%sender,"You're not an admin"))
      admprojectilechanger(%sender,%msg,"BounceProjectile");
    return;
  }
  else if(%code $= "/normal")
  {
    if(IsAdmin(%sender,"You're not an admin"))
      admprojectilechanger(%sender,%msg,"DefaultProjectile");
    return;



After the /normal code put:

}
else if(%code $= "/code")
{
if(IsAdmin(%sender,"You're not an admin"))
admprojectilechanger(%sender,%msg,"YourProjectile");
return;


Replace where it says code with the code you want and replace YourProjectile with the name of your projectile in your special.cs document.

Hope This Helps

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Thu Jul 24, 2008 4:52 am
by luke
That would help i gto ACAS nnow but now my pc puts the code SIDEWays witch makes things MUCH harder to find. can someone send me a admin codes file unmodified so i can read it up/down scroll instead of side-to-side? PM me plz.

i can make weps now. But i have dash on other pc. and now over tehre i made a code for it. man.
the code is /big and wehn i edited i also did somethign else.
When the codes messenger reache sprojectile changing codes. it says:

Projectile Changing Code:
/speedy /bounce /area /big
and when you type /big you DO get my nuke wep. if anybody wants i can upload this wep and code and all. (the nuke takes about 5 shots for everyone to die lol)

Re: TUTORIAL: HOW TO MAKE WEAPONS/EMITTERS (UPDATED)

Posted: Thu Jul 24, 2008 12:16 pm
by Guest
Luke sure I will pm it to u.