Someone make splatoon guns
conan already did that didn't he? Only orange and blue, but still...
Anyways, here's my current code. It's not the greatest, I definitely intend to improve it.
1.
This is mostly Swollow's onExplosionHit code.
please don't kill me for using it, it's so simple that I can't think of any other way to do it so why rewrite the wheel2. For some reason, if you don't disable brick damage, the bricks around the blown-up bricks will get culled like there are still bricks there. Just turning off brick damage fixes this, since then the bricks are still there.
3. This packages the default rocket launcher projectile by default but you can change it to anything you want.
4. There is
NO TRUST CHECK and
NO MINIGAME CHECK on this. It always paints the bricks, no matter whose they are or what minigame they're in.
package ss_rlProjectilePaint
{
function rocketLauncherProjectile::onExplode(%this,%obj,%pos)
{
doPaintExplosionCheck(%this,%obj);
parent::onExplode(%this,%obj,%pos);
}
function doPaintExplosionCheck(%data,%obj)
{
if(!isObject(%data) || !isObject(%obj) || !isObject(%data.explosion) || (%radius = %data.explosion.damageRadius) <= 0.01)
return;
%mask = $TypeMasks::FxBrickObjectType;
%client = %obj.client;
%color = getRandom(26);
initContainerRadiusSearch(%obj.getPosition(),%radius,%mask);
while(%hit = containerSearchNext())
{
%hit.setColor(%color);
}
}
};
activatePackage(ss_rlProjectilePaint);
Use this at your own risk. Nothing bad SHOULD happen but this hasn't been tested extensively.
could you also set it so the rockets paint players when they explode?
Possibly. That's a bit lower on my priority list. I'm currently working on getting an item set up.