Game Development Community

How do I turn off/disable a collision poly on an object?

by Path · in Torque Game Builder · 02/20/2009 (6:02 pm) · 2 replies

I'd like to setup a sequential group of objects that are clicked on in a certain order.

But can't allow the player to click 1, then 2, and go back and click 1 again.

Out of 10 objects, only BOX 1's collision poly(cp) is enabled at the beginning of the level.

After you click BOX 1, it's cp is disabled and BOX 2's cp's are enabled,... all the way up to BOX 10.

Also, how do I control alpha?

I've tried:

SceneObject.setBlendAlpha(%alpha) = 150;

&

SceneObject:setBlendAplpha(150);

No luck

#1
02/20/2009 (6:11 pm)
Since you are clicking, I am assuming you are you the mouse callbacks for the object so I would just enable or disable mouse callbacks on the object as needed. Check the reference docs to see exact method to do it.

The Alpha can be set by

Sceneobject.setblendalpha(0.5);

The acceptable values are from 0.0 to 1.0
I assume anything over 1.0 is clamped to 1.0 and nothing seems to happen.

#2
02/20/2009 (6:43 pm)
Thanks, you were right on.

Examples:

Box.setblendalpha(0.2);
Box.setUseMouseEvents(false);