Game Development Community

SetOverrideTexture not working

by Nathan Bowhay - ESAL · in Torque Game Engine · 10/05/2006 (10:50 am) · 2 replies

I am using a 1.4 RTS kit. I change the inheritance of the RTSbuilding and the RTSbuildingMaker.

Mod Edit:

Please do not post RTS-SK code in the Torque forums. Use the RTS-SK forums.

#1
10/05/2006 (10:50 am)
Mod Edit: code deleted.

Why isn't it working. I don't have a full understanding of mShapeInstance. I am guessing it is something to do with the fact that it use to be inheriting from TSstatic. Yet every StaticShape has cloaking that is doing the same thing (not positive it cloaking works). I am able to place the object, but the texture is the environment map and not my texture. Note: if you copy this into the RTS pack make sure and give the building it's own datablock as it needs one now.

Giving it a datablock:
go to starter.rts/server/scripts/items/building.cs and add:
datablock StaticShapeData(BuildingMarkerBlock)
{
shapeFile = "~/data/shapes/building/building.dts";
category = "Building Marker";

boundingBox = "10.0 10.0 3.0";
};

then go to starter.rts/client/scripts/playGui.cs. Then search for "$NewQuad = new RTSBuildingMarker()" and place:
datablock = BuildingMarkerBlock;
below:
thedatablock = "TestBuildingBlock";

If anyone knows why setOverrideTexture isn't working please help.
#2
10/06/2006 (9:02 am)
Terribly sorry!