The original script was made by Wheatley, but i edited it so every color except for a select few are not portalable
package PortalColorMod
{
function fxDtsBrick::OnPlant(%This,%brick)
{
if(%brick.colorID == 16)
{
%brick.antiportal = 0;
}
if(%brick.colorID == 6)
{
%brick.antiportal = 0;
}
if(%brick.colorID == 5)
{
%brick.antiportal = 0;
}
else
{
%brick.antiportal = 1;
}
parent::OnPlant(%This,%brick);
}
function FxDtsBrick::onColorChange(%this,%brick)
{
%newcolor = %brick.colorID;
if(%newcolor == 16)
{
%brick.antiportal = 0;
}
if(%newcolor == 6)
{
%brick.antiportal = 0;
}
if(%newcolor == 5)
{
%brick.antiportal = 0;
}
else
{
%brick.antiportal = 1;
}
Parent::onColorChange(%this,%brick);
}
};
Activatepackage(PortalColorMod);
However, everything is still portalable. What am I doing wrong?
I'm sorry if it's obvious, i have never done anything like this before. I'm new to this coding thing.