Author Topic: Minor problems with a simple weapon  (Read 907 times)

I intend to make a dodgeball and so far everything is working just fine. I can recolor the dodgeball inventory icons, first person model and the item model when it's spawned. In other words the weapon is working perfectly except for two things. The collision and the model color when it's thrown.

How do assign the sphere model a collision mesh? I tried to export the model with a group called "col-1" with no material but it didn't work. (Milkshape.)

Then there's the problem with the model color when it's a projectile. It's white regardless of what I do. How do I change that?

Oh and is there some fancy piece of code that I could add to the "directDamage" part to just kill the player rather than causing loads of damage?

Well, you don't need to give projectiles collision, and what could you be doing wrong with your projectile. I tried twice, and it worked.

set these values in the script:

isballistic = true;
bounceElasticity = 0.9;
bounceFriction = 0.1;
armingdelay = [one less than lifetime]*

*if lifetime = 30000; then armingdelay = 29900;

Well, you don't need to give projectiles collision, and what could you be doing wrong with your projectile. I tried twice, and it worked.
But I'd really like a collision box for my projectile.

I'm using the latest MilkShape. The box's group name is "Collision0" and it has no material. I'm exporting it as Torque Game Engine DTS without animation, exporting material info and Collision Mesh as Collision Meshes.

How do I change the model's color when it's thrown and is a projectile?

Interesting. It appears that I must have had the wrong material name or something, because now the material works perfectly. It changes the ball's color in world, first person and projectile depending on the material color.

Now my question is, is it possible to change a model's color with the script? I'd rather not have four .dts files with different material name just to recolor the ball.

Let me put it this way.

Can I color shift projectiles?

But I'd really like a collision box for my projectile.

I'm using the latest MilkShape. The box's group name is "Collision0" and it has no material. I'm exporting it as Torque Game Engine DTS without animation, exporting material info and Collision Mesh as Collision Meshes.

How do I change the model's color when it's thrown and is a projectile?
That is the problem. You need to export to Torque DTS Plus.

That is the problem. You need to export to Torque DTS Plus.
That allows me to colorshift projectiles? If you mean the collision box, using the DTS Plus didn't work.

That allows me to colorshift projectiles? If you mean the collision box, using the DTS Plus didn't work.
You always export to Torque DTS Plus, unless you are making a map. Everything must be exported to T DTS Plus.

Why is that? I didn't use the plus and the model works just fine.

Why is that? I didn't use the plus and the model works just fine.
Just, always do Plus. Just do it. If you don't you can have problems.

Fine fine. I still want to colorshift projectiles so I don't have +30 datablocks.

Projectiles already have collision boxes, they are their own. And I don't know about color shifting.

Yeah. At the center of the object. That works too I guess. Still wanting that colorshift.