Author Topic: Overriding Color-Changing  (Read 863 times)

Is there any way to dictate what happens when the color of ANY brick is trying to change? I've tried individual brick types ::setColor and fxDTSbrick::setColor with no results.

Something like this should work just fine.

Code: [Select]
package setColor
{
function FxDTSBrick::setColor(%obj,%colorID)
{
if(%colorID $= "" || %colorID < 0 || %colorID > 64)
{
%colorID = 0;
}

Parent::setColor(%obj,%colorID);
}
};

activatePackage(setColor);
« Last Edit: June 16, 2008, 09:30:32 AM by Trader »

I could of sworn I did that and it didn't work. Does capitalization matter with functions regarding objects like the FxDTSBrick?

Edit: It works, by the way. <3 u
« Last Edit: June 16, 2008, 09:35:59 AM by IbanZ »

Does capitalization matter with functions regarding objects like the FxDTSBrick?

No.

It works, by the way.

I know. :cookieMonster:

Since you're around, I've got two codes I'd like you to decipher.

Code: [Select]
%newpos = vectorAdd(%pos,vectoradd(vectorscale(%normal,0.22),"0 0 -0.03"));and
Code: [Select]
if(isobject(containerFindFirst($TypeMasks::FxBrickObjectType,vectoradd(%newbrick.getposition(),"0 0 0.2"),0.2,0.2,0.25))&&!isobject(containerFindNext()))%newbrick.settransform(vectoradd(%newbrick.getposition(),"0 0 0.2"));
I'm stumped.

EDIT: It might note-worthy to say that this is in an ::onCollision function

Why not ask the guy you nabbed it off? I assume it was qwertyuiopas/hammerdwarf because he can't afford a spacebar or a return key for his computer.

Why not ask the guy you nabbed it off? I assume it was qwertyuiopas/hammerdwarf because he can't afford a spacebar or a return key for his computer.
100% correct. Before I began modifying ANYTHING I had to go through and make most of the code on the script look somewhat decent just so I could begin to understand what the forget was going on.

I'll pop him a PM.