mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-24 13:55:31 +03:00
Page:
VScript VScriptProxy
Pages
Base Animating
Base Combat Character
Base Entity
Base NPC
Base Weapon
Convar Lookup
Debug Commands
Drawing entities in specific view IDs
Entity List
Enum Reference
Filters
Frequently Asked Questions (FAQ)
Gameplay Changes
Graphical Changes
Home
How Mapbase can be used in specific settings
I O System Changes
Introduction to Mapbase
List of Modified Source Files
Map Compilers
Map Specific Scripts
Mapbase Credits
Mapbase Disclaimers
Mapbase Multi Tool
Mapbase Setup Troubleshooting
Media Resources
Modding with Mapbase
Prefabs and workarounds obsoleted by Mapbase
Projected textures
RPC Integration (Discord, etc.)
Reviewing Mapbase pull requests
Setting up Mapbase
Shader Changes
Skyboxes
Using Git with Mapbase
Using Mapbase Content
Using VScript as a HL2 mapper
VScript Basic Entity Code Tutorial
VScript Basic IO Tutorial
VScript Filters
VScript VScriptProxy
VScript in Mapbase
Wildcards and Matchers
math_lightpattern
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. |
- Something Index
- Something special
- Something else