diff --git a/VScript-:-VScriptProxy.md b/VScript-:-VScriptProxy.md new file mode 100644 index 0000000..d05953d --- /dev/null +++ b/VScript-:-VScriptProxy.md @@ -0,0 +1,57 @@ +Mapbase introduces a material proxy which allows mappers to manipulate material variables from within a script file. + +```squirrel +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. | \ No newline at end of file