Author Topic: Two questions about the spraycan.  (Read 782 times)

1) What would be the best way of detecting when a brick is colored?

2) Would there be a way to force a client to use only a single color?
« Last Edit: August 22, 2011, 10:37:12 PM by otto-san »

1) What would be the best way of detecting when a brick is colored?

2) Would there be a way to force a client to use only a single color?

I have some ideas for number 1, but I dont think my ideas are very efficient.

For number two, you can package servercmdusespraycan(%client, %colorid)
Make it so that they can't call it on any color except a certain one.

I have some ideas for number 1, but I dont think my ideas are very efficient.
-snip-

Just try packaging onProjectileHit or whatever handles the spraycan hitting a brick.
PACKAGING WORKS WITH EEEEEVERYTHIIIIIING

1) Package fxDTSbrick::setColor(%brick, %color)

1) Package fxDTSbrick::setColor(%brick, %color)
Okay. Thanks.

In order to decide which would be the best way to do #2, what do you plan on using it for?

You can also use fxDtsBrick::onColorChange(%brick,%color), I think that's the correct arguments.

If you need it for the same thing as number two then you're best off packaging the project collision so that you can retain the client, however fxDtsBrick::setColor might have a %client argument on the end too.

perhaps something like this?
Code: [Select]
package OnlyOneColor{
   fxDTSbrick::setColor(%brick, %color)
   {
       //instead of passing the functions color, just input the desired one.
        parent::setColor(%brick, <placeColorIDHere>);
   }
};
activatePackage(OnlyOneColor);

In order to decide which would be the best way to do #2, what do you plan on using it for?
Armageddon had this concept for a gamemode where two teams try and set the most bricks to their colour, and I just said "eh, why not?".

Armageddon had this concept for a gamemode where two teams try and set the most bricks to their colour, and I just said "eh, why not?".
Yeah we were talking with him about that on the dueling server.

In that case, disable painting and make spray can items (for Q) which use the colorset paint images.

Yeah we were talking with him about that on the dueling server.

In that case, disable painting and make spray can items (for Q) which use the colorset paint images.
oh!

that's a good idea!