Skip to content

Instantly share code, notes, and snippets.

@awentzonline
Last active December 23, 2017 23:24
Show Gist options
  • Select an option

  • Save awentzonline/abfa1e2ac9e4fd54d1dad6afd93e8cff to your computer and use it in GitHub Desktop.

Select an option

Save awentzonline/abfa1e2ac9e4fd54d1dad6afd93e8cff to your computer and use it in GitHub Desktop.
Simple custom scripted entity for SteamVR Home
EntityFramework:CreateCppClassProxy("CPhysicsProp")
CFooEntity = class(
{
-- Put instance variables here
-- foo = "bar"
},
{
Specification =
{
bases = {"prop_physics"},
description = "Entity for Fooing around.",
tags =
{
"ping",
"pong",
"prop"
},
designername = "prop_ping",
helpers = "model() sphere(fademindist) sphere(fademaxdist)",
inputs =
{
Ping =
{
tags = "publish",
description = "Bring the ping, I'll bring the pong"
}
},
outputs =
{
Pong =
{
tags = "publish",
description = "Fired when the foo hits the bar."
},
Dumb = -- The game seems to crash if you have exactly one output?
{
tags = "publish",
description = "The game seems to crash if you have exactly one output?"
}
}
},
}, EntityClasses.CPhysicsProp)
EntityClasses["CFooEntity"] = CFooEntity
function CFooEntity:Ping(params)
self:Pong(self, self, 0)
end
@awentzonline

Copy link
Copy Markdown
Author

Oh the whitespace hurts 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment