SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
Mantas T 1 3 Nov, 2019 @ 10:21pm
simple trigger set up
So I have some trouble turning of / on a light. At the end i want to have a situation where if specific objects (six of them) are placed in correct places (trigger box's) the light turns on and one material of one object gets self illum from black to a color. For test i am trying to make it with a player hitting a trigger box and just making a light to change its state. but even this simple thing doesn't work. where am i making a mistake? images:
https://www.flickr.com/photos/maantas/49010749478/in/dateposted-public/
https://www.flickr.com/photos/maantas/49011491592/in/dateposted-public/
< >
Showing 1-3 of 3 comments
Rectus 13 3 Nov, 2019 @ 11:41pm 
That looks correct at least. For the trigger to work it needs to have the Clients spawnflag set (it should by default).

A thing to watch out for with the lights is that they have a baked component enabled by default, so if you baked lighting it can't be fully disabled in-game. You could test it by manually toggling the light through the console with: ent_fire L2 Toggle
Mantas T 1 5 Nov, 2019 @ 2:26am 
Thank you very much! now it works. If I may, id have some follow up questions.
a. now my trigger is activated when vr player enters a trigger box. how would i go in making that particular object (when moved) to trigger area would do same light switch?
b. how can i affect a indirect illumination value of a material with same setup? ( or other sollutions would be better like hiding one object somehow and revealing another or just moving objects so i could swap one that has no indirect illm. to one that has it)
c. what would be a good way of having multiple triggers to turn on the light - so i want to make a "puzzle" where 6 objects has to be placed in right spots for a trigger to work.
thank you!
Rectus 13 5 Nov, 2019 @ 3:02am 
a. You can use a filter entity like filter_activator_name to pick what entities can activate the trigger. Make sure you have the appropriate spawnflags checked in the trigger too.

b. You can't really affect the indirect illumination directly. I'd recommend turing it off on the light. But if you really need it, it might be possible using world layers and baking the lighting separately for the swithcable objects. See the first three parts of this page on how to set up them (the tile editor isn't in Home): https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Level_Design/World_Layers

c. Something like a math_counter adding 1 for each trigger activation should work.

The triggers and math/logic entities work the same way as in Source 1. There should be a lot of tutorials for those kinds of things available if you search for them.
< >
Showing 1-3 of 3 comments
Per page: 1530 50