Game Development Community

WeaponFireLight

by Tim Heldna · in Torque Game Engine · 07/25/2006 (8:00 am) · 10 replies

Hi John, I'd really appreciate some help with this one.

In TLK1.4 the WeaponFireLight function doesn't appear to be working for ShapeBaseImageData.

I tested in a virgin install of Torque (non TLK) and it worked fine. I then tested in TLK1.4 with the same script, weapon dts and player dts and no dice.

If I change the lightType to "ConstantLight" that works.

The only way I could get the WeaponFireLight working was to do some nasty brute forcing in source.

Approx line 111 of ShapeImage.cc
//lightType = ShapeBaseImageData::NoLight;
   //lightColor.set(1.f,1.f,1.f,1.f);
   //lightTime = 1000;
   //lightRadius = 10.f;

   //Added to brute force WeaponFireLight
   lightType = ShapeBaseImageData::WeaponFireLight;
   lightColor.set(0.55f,0.5f,0.5f,1.0f);
   lightTime = 350;
   lightRadius = 1.8f;
   //end add

If I force the WeaponFireLight as shown above, it works flawlessly. Obviously each weapon that doesn't have a WeaponFireLight must contain this:
lightColor          = "0 0 0 0";
   lightTime           = "0";
   lightRadius         = "0";

I'm going crazy John, what do you make of the situation?

Any other TLK users noticed the absence of a WeaponFireLight?

N.B. Be sure to disable the projectile light if you're trying to reproduce as you may confuse this with a WeaponFireLight.

- Tim

#1
07/26/2006 (5:15 am)
Hi Tim,

Was the TGE version also 1.4? If so can you do a quick diff between the TGE and TLK shapeBase.cc and shapeImage.cc to see if there are any differences that may have been included in TGE 1.4 after the initial release.
#2
07/26/2006 (6:01 am)
Hi John,

Yes TGE 1.4.

I compared shapeBase & shapeImage and was unable to spot any differences that would cause the problem.

Upon further investigation it would appear that the WeaponFireLight isn't even working in TGE1.4. It works sometimes but not always. In TLK it doesn't work at all.

Do WeaponFireLight's work for you John? Have you tried reproducing problem? If they do work and you're using a modified version of shapeBase or shapeImage could you post a link to the file(s) here?

Thanks.

- Tim
#3
07/26/2006 (11:34 pm)
Bump with a sense of humor and a sight gag for your amusement.

i5.photobucket.com/albums/y189/fjs/tumbleweed.jpg
#4
07/27/2006 (12:32 am)
Well after all that the problem stems from the player.dts.

Use the standard Orc dts that ships with Torque and no problems. Use the soldier pack dts and you loose the WeaponFireLight. Never trust someone elses model ;)

From what I can tell in order for the WeaponFireLight to work, you must have a large scaled model which isn't a good thing. Doesn't make sense that when you brute force the WeaponFireLight in head code like I show in my first post it works regardless of the player dts model.

I would still really like to know what the problem is. I don't want to have to scale all my player models to 2.4 metres high just for the sake of a WeaponFireLight. Any ides or should I move this post into the TGE forums as WeaponFireLight isn't part of the TLK codebase?
#5
07/27/2006 (5:54 am)
More research indicates that the player.dts from the soldier pack is the sole culprit. I guess not all content packs are created equal. I realize I might be talking to myself here however perhaps someone else will benefit from my mistakes.
#6
07/27/2006 (6:34 am)
I'm not sure why you sound impatient, its been just over 24 hours since my last post. Synapse Gaming holds normal business hours, and with a number of projects going on internally you can't expect minute-to-minute responses. Chances are no one else has seen this problem (at least no one has mentioned it before), and thats why the community isn't chiming in either.

I don't know of a difference between the models that could cause the problem, but I would contact the makers of the soldier pack to see if they can fix it.
#7
07/27/2006 (6:52 am)
Sorry, I didn't intend to sound rude. Frustration gets the best of me. I don't expect minute-to-minute responses, but I would prefer it if bugs in TGE were addressed a lot more efficiently than they currently are.
#8
07/27/2006 (7:58 am)
*Pops in* I had this problem too a long while back when we began using the Soldier Pack. Then I changed my model and it worked fine.
#9
07/27/2006 (8:16 am)
Hi C2,

The soldier pack seems to be quite problematic. I don't own it nor am I using it. Was doing some work for another Torque user when I discovered the problem.

Thanks for popping in! =)

*Side Track*
How'd the eyeOffset code work out?
#10
07/27/2006 (8:36 am)
Worked perfectly, thanks for the help. :)