Need lots and lots of help...

Author Topic: Need lots and lots of help...  (Read 2645 times)

Well, I want to learn how to script. I've looked at quite a few tutorials, and I'm rrreeeaaalllyyy confused. I have Blender (would get MS3d but they don't have it for mac  :panda: ). So what program do I use to make scripts? And what is flat shading? Just tell me the really basic basics. I know I'm a real noob :(

Well then.

Take a look at some .cs files in the add-ons folder.

Hang around the coding forums and look at some scripts.

If you can, learn some other more basic code. I started with Game Maker, which has a VERY useful help file to get you started on coding.

I see. I will do what you said.
So what program do I use to make scripts?
I did find a "Script Editor" on ma Mac, and AppleScript Utility. <==== Edit on AppleScript: I found out it uses the AppleScript language.  :panda:
Edit on Script Editor: Found out that I can select different languages, but the only one that shows up is AppleScript. Double panda.  :panda:  :panda:
« Last Edit: November 05, 2007, 08:57:57 PM by LegoEggo »

Do you have Notepad or something similar?


yes, text edit will work just fine, just bouble click on the .cs folder in your addons folder (in applications -> blockland) and click on like say "gun.cs" and copy it. open the copied version, then you can mess with the textures and values. not you will have to chnage the datablocks, if you dont it wnt wrk properly, you will have to do that for every new weapon/vehicle you create, and always rename the .cs file. These are datablocks (in red):

/gun.cs

//audio
datablock AudioProfile(gunShot1Sound)
{
   filename    = "./sound/gunShot1.wav";
   description = AudioClose3d;
   preload = true;
};
datablock AudioProfile(insert name herebulletHitSound)
{
   filename    = "./sound/arrowHit.wav";
   description = AudioClose3d;
   preload = true;
};


//shell
datablock DebrisData(gunShellDebris)
{
   shapeFile = "./shapes/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;
};


//muzzle flash effects
datablock ParticleData(gunFlashParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 25;
   lifetimeVarianceMS   = 15;
   textureName          = "base/data/particles/star1";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.9 0.9 0.0 0.9";
   colors[1]     = "0.9 0.5 0.0 0.0";
   sizes[0]      = 0.5;
   sizes[1]      = 1.0;

   useInvAlpha = false;
};
datablock ParticleEmitterData(gunFlashEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "gunFlashParticle";
};

datablock ParticleData(gunSmokeParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.5 0.5 0.5 0.9";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.15;

   useInvAlpha = false;
};
datablock ParticleEmitterData(gunSmokeEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "gunSmokeParticle";
};


//bullet trail effects
datablock ParticleData(insert name herebulletTrailParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.0;
   inheritedVelFactor   = 1.0;
   constantAcceleration = 0.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/thinRing";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.3 0.3 0.9 0.4";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.25;

   useInvAlpha = false;
};
datablock ParticleEmitterData(insert name herebulletTrailEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "insert name herebulletTrailParticle";
};


datablock ParticleData(gunExplosionParticle)
{
   dragCoefficient      = 8;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 700;
   lifetimeVarianceMS   = 400;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -50.0;
   spinRandomMax      = 50.0;
   colors[0]     = "0.9 0.9 0.6 0.9";
   colors[1]     = "0.9 0.5 0.6 0.0";
   sizes[0]      = 0.25;
   sizes[1]      = 1.0;

   useInvAlpha = true;
};
datablock ParticleEmitterData(gunExplosionEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 89;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "gunExplosionParticle";
};


datablock ParticleData(gunExplosionRingParticle)
{
   dragCoefficient      = 8;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 300;
   lifetimeVarianceMS   = 100;
   textureName          = "base/data/particles/star1";
   spinSpeed      = 10.0;
   spinRandomMin      = -50.0;
   spinRandomMax      = 50.0;
   colors[0]     = "1 1 0.0 0.9";
   colors[1]     = "0.9 0.0 0.0 0.0";
   sizes[0]      = 0.2;
   sizes[1]      = 0.2;

   useInvAlpha = false;
};
datablock ParticleEmitterData(gunExplosionRingEmitter)
{
   lifeTimeMS = 50;

   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 89;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "gunExplosionRingParticle";
};

datablock ExplosionData(gunExplosion)
{
   //explosionShape = "";
   soundProfile = bulletHitSound;

   lifeTimeMS = 150;

   particleEmitter = gunExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   emitter[0] = gunExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 2;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";
};


AddDamageType("Gun",   '<bitmap:add-ons/ci/gun> %1',    '%2 <bitmap:add-ons/ci/gun> %1',0.5,1);
datablock ProjectileData(gunProjectile)


and it goes on, you get the idea. look around in you shapes, sound, and other folders in your addon folder. you can add sounds to your sound folder, and change it is your .cs files. that is a baisic overview of how to make .cs files and mods. if you ned help, ther are alot of experianced users in the coding help section of the forums.



you dont code from scratch unless you know torque script, you can get the torque engine here: http://www.garagegames.com/



3d modeling: there are lots of ways ad programs that you can model things, what you should start with is google sketchup, it is avery easy to use program, and ony of the only good and easy ones for your mac. it can be found here: http://sketchup.google.com/

well, that wraps things up, and don't forget to tell people that you have a Mac, you failed to state that, but i have mac and windows so i know what you are talking about  :cookieMonster:. good luck!
« Last Edit: November 05, 2007, 09:38:01 PM by Radial543 »

:) Thanks much! I do have one question, though: When I am modeling stuff in say SketchUp (I have tried it previously), how large should it be? And how do I get it to a .dts? And if I wanted to change the model for the gun, how would I do that?
« Last Edit: November 05, 2007, 11:38:28 PM by LegoEggo »

well, there re lots of other different modeling options, but alot of them are either for windows, or expensive. here are some links to othr places in the fourum that people have mmade topics of minifigure refreences for modeling:

http://www.blockland.us/smf/index.php?topic=22569.0                    <-- Full body

http://www.blockland.us/smf/index.php?topic=21569.0                    <--hand

alot of these might not be compatible for google sketchup, but look around the sketchup side and try to find a onverter, i am pretty shure there is one some where  :cookieMonster:

The hand is two inches wide on Sketchup.

So how wide would a handle be, if the hand is 2 inches?

1 to 1.5? Compare the width of your in-game hand to the handle of the gun when holding it:

This is very helpful for finding out how wide something should be, I used it quite a bit while making models:

Minifig Reference Figure
http://www.blockland.us/smf/index.php?topic=22569.0

So how wide would a handle be, if the hand is 2 inches?

Haha I'm 6 days late.

I meant, the handle should be 2 inches wide. Sorry about that.

So how wide would a handle be, if the hand is 2 inches?

Haha I'm 6 days late.

I meant, the handle should be 2 inches wide. Sorry about that.
Lol. 6 days.

This is very helpful for finding out how wide something should be, I used it quite a bit while making models:

Minifig Reference Figure
http://www.blockland.us/smf/index.php?topic=22569.0
well, there re lots of other different modeling options, but alot of them are either for windows, or expensive. here are some links to othr places in the fourum that people have mmade topics of minifigure refreences for modeling:

http://www.blockland.us/smf/index.php?topic=22569.0                    <-- Full body

http://www.blockland.us/smf/index.php?topic=21569.0                    <--hand

alot of these might not be compatible for google sketchup, but look around the sketchup side and try to find a onverter, i am pretty shure there is one some where  :cookieMonster: