Blockland Forums > Modification Help

Brick setShapeName script

Pages: << < (5/9) > >>

Furling:


--- Quote from: Syntax on August 21, 2010, 07:07:23 AM ---something like this, i believe..


new TSStatic(thisname)
{
   shapename =something.shapefile;
};

--- End quote ---

it would make this:


--- Code: ---
new TSStatic(setShapeName)
{
shapename =setShapeName.shapefile;
};
--- End code ---
???? you did read whole this topic about setShapeName ?

Headcrab Zombie:

TSStatics don't have a setShapeName method, that's why I didn't suggest this method earlier on, I tested it out on a TSstatic on accident instead of a StaticShape


--- Code: ---datablock StaticShapeData(emptyShape) //assuming there isnt one already
{
    shapeFile = "base/data/shapes/empty.dts";
}

function fxDTSBrick::setShapeName(%this,name)
{
    //stuff

    %this.nameShape = new StaticShape()
    {
        datablock = emptyShape; //or name of preexisting one, if there is one
    };

    //stuff
}
--- End code ---


Furling:


--- Quote from: Headcrab Zombie on August 21, 2010, 01:47:45 PM ---TSStatics don't have a setShapeName method, that's why I didn't suggest this method earlier on, I tested it out on a TSstatic on accident instead of a StaticShape


--- Code: ---datablock StaticShapeData(emptyShape) //assuming there isnt one already
{
    shapeFile = "base/data/shapes/empty.dts";
}

function fxDTSBrick::setShapeName(%this,name)
{
    //stuff

    %this.nameShape = new StaticShape()
    {
        datablock = emptyShape; //or name of preexisting one, if there is one
    };

    //stuff
}
--- End code ---

--- End quote ---
I copy this and it say:


--- Code: ---datablock StaticShapeData(emptyShape) //assuming there isnt one already
--- End code ---
still error:
--- Quote ---datablock ##S##taticShapeData(emptyShape) //assuming there isnt one already
--- End quote ---


Headcrab Zombie:

That would be a problem with something of yours, before the datablock's definition

Furling:


--- Quote from: Headcrab Zombie on August 21, 2010, 03:17:59 PM ---That would be a problem with something of yours, before the datablock's definition

--- End quote ---
how I am going fix it ?

Pages: << < (5/9) > >>

Go to full version