Author Topic: Colorset setting properties mod - Help please.  (Read 689 times)

I was in a server today, and it was getting a pain to event every brick to give it certain properties. So, I came up with an idea for a colorset-based mod to make it so that if a brick is a certain color, it is automatically given certain properties.

Example: Painting a brick dark red turns it into both water and a damage zone.

Unfortunately, I'm not quite sure where to start off. I also need to know how ColorIndex would work as far as referring. If I'm right, I would use something along the lines of:
Code: [Select]
FxDtsBrick::OnColorChange
^If(brick.%newColor = [color-index-here])
^^isWater = 1;
^^[etc]

I was also hoping that, if the brick is loaded as [color-index-here], it would automatically obtain the properties.

If you'd like to contact me in game, my info is:
Name: °Core°
BLID: 11953

Thanks in advance.
« Last Edit: May 05, 2011, 11:01:45 PM by Wheatley »

Here's what I have for what I described in the suggestion thread:

Code: [Select]
package SupportSpecialPaintPackage
{
function paintProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
%colorID = %obj.getDatablock().colorID;
%client = %obj.client;
if(getTrustLevel(%obj,%col) >= $TrustLevel::FXPaint && (%colorID == 62))
{
if(%col.getShapeFxId() != 2)
{
%client.undoStack.push(%col TAB "SHAPEFX" TAB %col.getShapeFxID());
%col.setShapeFX(2);
}
}
else
Parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
}


};
Activatepackage(SupportSpecialPaintPackage);

I haven't used it in a while so I don't remember what the glitches with it were, I just remember it was glitchy

Here's what I have for what I described in the suggestion thread:
This'll only work when someone actually paints the brick. You should probably use fxDtsBrick::onColorChange like the OP said.