1 VScript VScriptProxy
Blixibon edited this page 2021-03-13 11:12:25 -06:00

Mapbase introduces a material proxy which allows mappers to manipulate material variables from within a script file.

function OnBind()
{
    local scale = self.GetVarFloat(1)

    if (entity != null)
    {
        printl("VScriptPoxy: Entity " + entity.GetClassname() + ", " + entity.GetName())
    }

    printl("VScriptProxy: Scale is " + scale)

    scale += 0.0005

    if (scale >= 2.0)
    {
        scale = 1.0
    }

    self.SetVarFloat(1, scale)
}
    "Proxies"
    {
        "VScriptProxy"
        {
            scriptfile "test_matproxy_2"
            var0 "$baseCenter"
            var1 "$baseScale"
            var2 "$baseRotate"
            var3 "$baseTranslate"
        }

        "TextureTransform"
        {
            centerVar "$baseCenter"
            scaleVar "$baseScale"
            rotateVar "$baseRotate"
            translateVar "$baseTranslate"
            resultVar "$basetexturetransform"
        }
    }


Signature Description
bool DidHitWorld() Returns whether the trace hit the world entity or not.