Answer Overflow
07/06/2026, 3:29 AMwildjerry
07/06/2026, 3:29 AMMain() to terminate(it not progressing through the values forced me to increment at the top of the function instead of the bottom) though I am not 100% sure of this. Looking at the "Info" on the back side of my controller, I see that Guide:NewPlane gives `cannot access field`(suggesting that the documentation is correct) while Cone seems to fail silently.
lua
Settings = {
description = "Places one guide at the brush each time the trigger is pressed."
}
local nextGuide = 1
function Main()
if not Brush.triggerPressedThisFrame then
return
end
local t = Transform:New(Brush.position)
currentGuide = nextGuide
nextGuide = nextGuide+1
if nextGuide > 6 then
nextGuide = 1
end
if currentGuide == 1 then
Guide:NewCube(t)
elseif currentGuide == 2 then
Guide:NewSphere(t)
elseif currentGuide == 3 then
Guide:NewCapsule(t)
elseif currentGuide == 4 then
Guide:NewEllipsoid(t)
elseif currentGuide == 5 then
Guide:NewCone(t) -- listed in docs, should work
elseif currentGuide == 6 then
Guide:NewPlane(t) -- not listed in docs, would be expected to exist
end
endwildjerry
07/06/2026, 3:30 AMwildjerry
07/06/2026, 3:35 AMlua
Settings = {
description = "Places one guide at the brush each time the trigger is pressed."
}
local nextGuide = 1
function Main()
if not Brush.triggerPressedThisFrame then
return
end
local t = Transform:New(Brush.position)
currentGuide = nextGuide
nextGuide = nextGuide+1
if nextGuide > 6 then
nextGuide = 1
end
if currentGuide == 1 then
print("trying Cube")
Guide:NewCube(t)
print("tried Cube")
elseif currentGuide == 2 then
print("trying Sphere")
Guide:NewSphere(t)
print("tried Sphere")
elseif currentGuide == 3 then
print("trying Capsule")
Guide:NewCapsule(t)
print("tried Capsule")
elseif currentGuide == 4 then
print("Trying Ellipsoid")
Guide:NewEllipsoid(t)
print("Tried Ellipsoid")
elseif currentGuide == 5 then
print("trying cone")
Guide:NewCone(t) -- listed in docs, should work
print("tried cone")
elseif currentGuide == 6 then
print("trying plane")
Guide:NewPlane(t) -- not listed in docs, would be expected to exist
print("tried plane")
end
endandybak
07/06/2026, 2:27 PMwildjerry
08/19/2026, 3:41 PMandybak
08/19/2026, 5:56 PMwildjerry
08/20/2026, 2:18 AMandybak
08/23/2026, 9:16 AM