Author Topic: FakeKillBrick and mandatory brick colors  (Read 1994 times)

I searched for exactly how the %Brick.fakeKillBrick(); script line works.

Would it be FakeKillBrick(x, y, z, time); or similar on the x-y-z params? because that doesn't really matter.

I would also like to know what the most efficient script for making mandatory brick colors.

Sorry for the large amount of help topics, but if there was a "basic script commands" thread, it would make my project much easier.

Tom

Its fakeKillBrick("x y z", time);
The vector is in one string, remember he spaces!

Its%brick fakeKillBrick("x y z", time);
The vector is in one string, remember he spaces!
Fixed.

Tom

Fixed.
Nope, just checked in console, its fakeKillBrick.

mkay. Thanks.

Also, what's with this?

Code: [Select]
}

package ##d##igging

{

^^function Diggerprojectile::oncollision(%this,%obj,%col,%fade,%pos,%normal)

^^{

^^^if(!isobject(%col)){return;}

^^^if(%col.getDatablock() $= nametoid("brickDirtData"))

^^^{

^^^^%col.hits++;

^^^^commandToClient(%obj.client, 'centerPrint', "\c4Hits \c6" @ %col.hits @ "/1", 3);
>>> Error report complete.

ADD-ON "Script_TrenchWar" CONTAINS SYNTAX ERRORS

:\

You didn't close something before the package.

You didn't close something before the package.
ive been getting this error a lot to. can you tell me exactly how to fix it?

You didn't close something before the package.

I guess that's the reason that the Resource mod is a bad base. Let me check the stuff before it.

Paste the function above it.

Paste the function above it.

I already fixed it, maybe, but each time I fix one thing, another "debilitating" glitch pops up.
It's usually how many spaces there are, or weird tabs, or whatever. Annoying.

ive been getting this error a lot to. can you tell me exactly how to fix it?
Close the function/package/datablock/object above the error properly.

what do you mean mandatory? if you mean that ppl can only use one color, just change your color list to only one color. Otherwise, idk

I'm also interested in having the brick a certain color when someone plants it.



I'm also interested in having the brick a certain color when someone plants it.

I'm not sure but could this work?
Code: [Select]
-
Missed some stuff:

Code: [Select]
function fxDTSBrick::onPlant(%this, %brick)
{
        %color = "0.000   1.000   0.000";
        Parent::onPlant(%this, %brick);
        function FxDTSBrick::setColor(%brick, %color)
}


Correct me if i am wrong.
« Last Edit: May 08, 2009, 11:25:24 AM by Protokol »

Whats the second function for? Can't you get a specific color ID then package Onplant so that it sets the color Id of the brick to that color?