Talk:SteamVR/Environments/Scripting/flashlight script code full

From Valve Developer Community
Jump to: navigation, search

Problem when I drop the flashlight

I copied the exact code, for the flashlight, and it works, but as soon as I drop the flashlight either A: If I'm in Hammer, then Hammer crashes, or B: If I'm in Steam VR, then it freezes, goes to the Steam VR loading screen, and stays there. Until I press the Windows button on My WMR controllers, that takes my back. But if I go back into Steam VR, it still is at the loading screen. Please help! —The preceding unsigned comment was added by Fox G∆MING (talkcontribs).

Looks like the script killing the light entity only after the tool has been dropped is what's causing it. I added code to kill the light sooner, and that seems to have fixed it. Rectus (talk) 14:46, 11 June 2018 (UTC)