Game Development Community

Using cloak texture

by James Hill · in Torque Game Engine · 10/15/2004 (10:06 am) · 3 replies

I thought I posted this, but it didn't show. So sorry if this is double posted. I'm trying to use a cloak texture - I've read to use cloakTexName = " path ", but I can't find it. Anyone know where I can look?

#1
10/15/2004 (10:10 am)
I should clarify, I found it in the code..but I'm not sure how to set it in the script.
#2
10/15/2004 (10:24 am)
There are a couple of ConsoleMethods in shapebase

cloakTexName is a parameter of the shapeBaseData. So when you setup your datablock, you can setup the cloak texture.


datablock PlayerData(DummyPlayer)
{
    shapeFile = "dummy.dts";
    cloakTexture = "my_cloak_texture.png";
};



ConsoleMethod( ShapeBase, setCloaked, void, 3, 3, "(bool isCloaked)")
- true will turn on cloaking
- false will turn off cloaking

ConsoleMethod( ShapeBase, isCloaked, bool, 2, 2, "")
returns true if cloaked

%player = new Player()
{
     datablock = DummyPlayer;
};

%player.setCloaked( true );
#3
10/15/2004 (10:46 am)
Cool, thank you very much Simon :)