Gun script.
by Mark Junior · in Torque Game Engine · 01/13/2007 (9:29 am) · 9 replies
Hey guys. would someone please make a (someweapon).cs file of how a REALISTIC gun would fire because in the soldier pack the m16 has a wierd fire. etc. because you can SEE the bullet going forward when i want it to fire at the speed of light! And when the m16 bullet hits something it makes an light effect and an explosion sound. ( well the sound i could change ) but the rest is up to you guys please give me somekind of realistic gun script. ( remember this: im not forcing you ).
- Saska
- Saska
About the author
#2
01/13/2007 (9:33 am)
God i don't know im so dumb. THAT WAS SIMPLE thanks -.-.
#3
EDIT: Thanks the muzzlevelocity really helped but not the nolight or something what was its parameters name i set it to false and it still has a light.
01/13/2007 (9:33 am)
And 0.o fast response.EDIT: Thanks the muzzlevelocity really helped but not the nolight or something what was its parameters name i set it to false and it still has a light.
#4
EDIT: ( sorry for the spamming posts ) Hey , i got it all working by putting the explosion particle and waterexplosion particles away but now i shoot invisible shots ( good ) thanks for all the helP!
01/13/2007 (9:37 am)
Or is the explosion a different thing? then light.EDIT: ( sorry for the spamming posts ) Hey , i got it all working by putting the explosion particle and waterexplosion particles away but now i shoot invisible shots ( good ) thanks for all the helP!
#5
01/13/2007 (9:51 am)
No prob, lol. Taking a peek around the .cs files, especially examining weapon scripts can help a million when it comes to figuring things out.
#6
Each one these line will lead to datablocks, if you start following the link you will see where you can change the color, size and texture to get different effect. I am work on weapon tutorial that will explain alot of this.
particleEmitter = CrossbowExplosionFireEmitter;
// Point emission
emitter[0] = CrossbowExplosionSmokeEmitter;
emitter[1] = CrossbowExplosionSparkEmitter;
// Sub explosion objects
subExplosion[0] = CrossbowSubExplosion1;
subExplosion[1] = CrossbowSubExplosion2;
01/13/2007 (9:54 am)
Yes, I do not have your script. I will use the crossbow script as example. Search for " datablock ProjectileData(CrossbowProjectile) ". You will see this line " explosion = CrossbowExplosion; " in clean install of Torque it about line 727. Take CrossbowExplosion and do search in the crossbow.cs. You should come to this " datablock ExplosionData(CrossbowExplosion) " .Each one these line will lead to datablocks, if you start following the link you will see where you can change the color, size and texture to get different effect. I am work on weapon tutorial that will explain alot of this.
particleEmitter = CrossbowExplosionFireEmitter;
// Point emission
emitter[0] = CrossbowExplosionSmokeEmitter;
emitter[1] = CrossbowExplosionSparkEmitter;
// Sub explosion objects
subExplosion[0] = CrossbowSubExplosion1;
subExplosion[1] = CrossbowSubExplosion2;
#7
01/13/2007 (10:01 am)
Ok once again THANKS FOR THE HELP GUYS!!! meet you l@ter around the forums. ( man am i gonna buy the modern weapons pack ( i know its an art pack only ) but since now i know how to create weapon scripts MUHAHAHAHAHHAHAHHAHHAAAAAHHAAHAH *cough* *cough* ok i think i just lost my voice :D )
#8
01/19/2007 (2:38 pm)
Anyone got a decent Minigun script yet for the weapons pack?
#9
01/20/2007 (12:44 am)
If you have a script for the minigun. Cause my miniguns animations are broke i mean only the shooting one everything else works? do you have it working?
Torque Owner Chris Byars
Ion Productions