Blockland Forums > Modification Help
Brick setShapeName script
<< < (4/9) > >>
Red_Guy:
This should fix your syntax errors:

--- Code: ---registerInputEvent(fxDtsBrick,"OnBrick","tBrickMessage BrickMessage");
registerOutputEvent(Brick,"setShapeName","string 25 50",0);
registerOutputEvent(Brick,"setShapeNameColor","paintColor 1",0);
registerOutputEvent(Brick,"setShapeNameDistance","int 0 3000 300",0);
package Event_BrickMessage

function fxDtsBrick::setShapeName(%this)
  {
   Parent::setShapeName(%this);

   $inputTarget_Brick = %this;
   %this.processInputEvent("OnBrick",%this);
  }

  function Brick::setShapeNameColor(%Brick,%color,%client)
  {
    if(getWordCount(%color) == 1)
    {
      Parent::setShapeNameColor(%Brick,getColorIDTable(%color));
    }
    else
    {
      Parent::setShapeNameColor(%Brick,%color);
    }
  }

--- End code ---

but then listen to the others about how to accomplish what you really want to do.
Headcrab Zombie:

--- Quote from: Red_Guy on August 20, 2010, 04:45:50 PM ---This should fix your syntax errors:

--- End quote ---
Nope. There's still brackets missing for the package


Also, since none of the fxDTSBrick::setShapeName* methods exists, you don't need a package for them.
cciamlazy:
Push enter after the las line and put } that might fix it
Furling:
not worry about }

Right now I need know more about StaticShape how it was made ?
Syntax:
something like this, i believe..


new TSStatic(thisname)
{
   shapename =something.shapefile;
};
Navigation
Message Index
Next page
Previous page

Go to full version