Author Topic: Paint Rockets VS ATC Fort  (Read 1536 times)

...I figured out how to make rockets paint stuff when they exploded, mostly by copying Swollow's code that detects all bricks hit by an explosion.
I plan to make paint color a variable, so that you can pick certain colors to paint or have them set by your minigame team or whatever.

I painted it white with the New Duplicator first, because eventually I plan to make a gamemode based around paint and I plan for the maps to be white.

ATC Fort after I assaulted it.


The interior of ATC Fort.


I may have cheated and set the gun to fire rockets to do this faster.


could you also set it so the rockets paint players when they explode?


I plan to make paint color a variable, so that you can pick certain colors to paint or have them set by your minigame team or whatever.

I painted it white with the New Duplicator first, because eventually I plan to make a gamemode based around paint and I plan for the maps to be white.
splatoon?
splatoon.


Someone make splatoon guns and a gamemode quick

Now try it against one of Sylvanor's cities


Now try it against one of Sylvanor's cities
large scale paintball fight

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 wheel
2. 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.
Code: [Select]
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.
« Last Edit: June 11, 2017, 07:32:27 PM by Super Suit 12 »