Author Topic: Creating and editing weapons  (Read 741 times)

I'm new to block land and I have downloaded a lot of addons. Some addons I think could be improved by tweaking the range or what the bullets look like. The problem is I have no clue how to do any of this. Can some one please make a guide to creating/editing weapons?

This would require experience in scripting and modeling. It is easier to specialize in one or the other and team up with someone.

Modeling-
Modeling is the main looks and frame of the projectile of the weapon and the weapon it self. In blockland, less realistic and "more blocko" type styles are liked because of blocklands more natural blocky feeling. This does not mean you make a giant square that shoots little squares. Take a look at the default weapons and you will understand.
The most used software that 3D models and also is supported by torque is Milkshape for PC, and if you would prefer a free 3D easy GUI modeling I would suggest Google Sketchup, but this requires much file changing in order to get it to work with the torque system. This is just a small run down of Modeling, if you have any questions feel free to ask people who model here in blockland or google it.

Scripting-
Scripting is more complicated to some people. It is the brain of the weapon, it tells the weapon what to do when certain conditions are applied. Such as the left mouse button or the space bar, etc.
This is a simple audio code that basically says that when a projectile is fire play the follow .wav file (Taken from the default "Gun" script in blockland)
Code: [Select]
datablock AudioProfile(gunShot1Sound)
{
   filename    = "./gunShot1.wav";
   description = AudioClose3d;
   preload = true;
};
datablock AudioProfile(bulletHitSound)
{
   filename    = "./bulletHit.wav";
   description = AudioClose3d;
   preload = true;
};

This is a simple projectile code taken from the same "Gun" code. Feel free to look through the different scripts you have and try and test out different things. Be sure to not erase over weapons.
Code: [Select]
datablock DebrisData(gunShellDebris)
{
shapeFile = "./gunShell.dts";
lifetime = 2.0;
minSpinSpeed = -400.0;
maxSpinSpeed = 200.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 3;
staticOnMaxBounce = true;
snapOnMaxBounce = false;
fade = true;

gravModifier = 2;
};

I hope this got you understanding, and hopefully you can learn the rest yourself and HOPEFULLY become a swell add-on maker to the blockland community.