Bullet Holes ???
by Michael Schaumburg · in Torque Game Engine · 02/18/2005 (8:43 am) · 34 replies
I know there is an example code from May 2002 how to integrate Bullet Holes.
I think there is no engine modification necassary to integrate this in version 1.3
because it is already in.
I added in the script for my weapon :
and in the datablock ProjectileData() I added
but I can not see any bullet holes. Does anyone has an idea or I am wrong ......
I think there is no engine modification necassary to integrate this in version 1.3
because it is already in.
I added in the script for my weapon :
datablock DecalData(BulletHoleData)
{
sizeX = 0.125;
sizeY = 0.125;
textureName = "~/data/shapes/particles/smoke";
};and in the datablock ProjectileData() I added
DecalData = BulletHoleData;
but I can not see any bullet holes. Does anyone has an idea or I am wrong ......
#22
01/17/2007 (7:09 am)
WOOPS sorry there actually is a spark file in my soldier folder *
#23
After this line
I test it and it was working. Your texture should be in same folder as your weapon dts that way you can use different textures with different weapon. You have it in the data folder which is not good practice. If you only going to use one it would be better to put in the particles folder. This will keep everything organize.
01/17/2007 (9:14 am)
Add this line to datablock ProjectileData(AwpProjectile)explosion = AwpExplosion;
After this line
directDamage = 20;
I test it and it was working. Your texture should be in same folder as your weapon dts that way you can use different textures with different weapon. You have it in the data folder which is not good practice. If you only going to use one it would be better to put in the particles folder. This will keep everything organize.
#24
and do i need to have my textures in my guns folder? Or is it just to organize everything? cause im using the same particle texture as the m16 i have that came with the soldier pack.
01/17/2007 (9:31 am)
Didnt you see my code? i have explosion = AwpExplosion; right after directdamage = 20;...and do i need to have my textures in my guns folder? Or is it just to organize everything? cause im using the same particle texture as the m16 i have that came with the soldier pack.
#25
01/17/2007 (9:47 am)
I would put them there that way you will be organize. If you use the one with M16 then your path should be to the m16 folder. But then again it is up to you because it is your game. If you comfortable with it then go for it. I must miss that line, it will help me read it better if you put in code form. I take your decal is working.
#26
My explosion is doing nothing please sometime read my code?
01/17/2007 (10:13 am)
Noo my decal is not working... I just said i already had explosion = AwpExplosion; right after directdamage = 20;...My explosion is doing nothing please sometime read my code?
#27
Change from
to
In your state code where change Fire to Shoot, change it back to Fire and you will be good to go. The engine will not see shoot in the state code. Change it in state[3] to.
01/17/2007 (11:12 am)
I copy the above code to script here what I found.Change from
Datablock ParticleData( AwpSplashParticle )
to
Datablock ParticleData( AwpSplashParticle )
In your state code where change Fire to Shoot, change it back to Fire and you will be good to go. The engine will not see shoot in the state code. Change it in state[3] to.
#28
01/18/2007 (1:20 am)
Ok, the Datablock caps is gg forums fault it auto capitalizes the first letter. I changed it to shoot cause my awp animations uses shoot. Though ill change the awp to fire then thanks ill test it out now.
#29
01/18/2007 (1:35 am)
WOOT THANKS THANKS THANKS!!! IT WORKS THANKS!
#30
01/18/2007 (2:11 am)
Quote:Yes it will. There's nothing in source code that stipulates what each state has to be named. The reason Saska's script didn't work was due to the fact he set the stateScript to "onShoot" and his function was named "onFire".
The engine will not see shoot in the state code.
#31
01/18/2007 (2:31 am)
Hey guys, i got another prob this time though to annoy you less i put it in a site. Heres the code to my minigun that doesnt work , noc.postnuke.com/snippet/detail.php?type=snippet&id=31
#32
01/18/2007 (4:08 am)
Thanks Tim I clearly miss that one. So as long as the function and stateScript are the same anything will work. I read tutorial that download it said in there that only Fire will work. I will update my Tutorial.
#33
Change it to this
01/18/2007 (4:48 am)
The script is not compile because of this lineDecalData(MinigunBulletHoleData)
Change it to this
datablock DecalData(MinigunBulletHoleData)
#34
01/18/2007 (6:16 am)
Thanks alot i really appreciate that you guys have helped me this far now ive got an awp AND an minigun in my game its getting better and better! If you like i could send a little screenies how my game looks?
Torque Owner Mark Junior