Light that turns on when entering a room
Quote from Ragnarox97 on July 29, 2014, 1:57 pmI can not turn on the light of the observation room when I enter the first room of the map. I'll explain how I did it:
The two lights included in the instance of the observation room, I set with dark Initially = on.
Then I added a env_projectedtexture and I positioned at one of the two lights in the observation room.
I have assigned to projectedtexture name: light_room and the flags are set to Enabled = on, and the second option off.
Then I created a logic_auto (OnMapSpawn-> light_room> TurnOff)
then I created a logic_relay (OnTrigger-> light_room> TurnOn).
Finally, in front of the entrance door to the room, I placed a brush with trigger_multiple output (OnStartTouch-> "the logic_relay that controls the light" -> Trigger).
When I start the level and opens the door of the first room, the light is on! Instead must remain turned off until the trigger_multiple through. What was wrong?
I can not turn on the light of the observation room when I enter the first room of the map. I'll explain how I did it:
The two lights included in the instance of the observation room, I set with dark Initially = on.
Then I added a env_projectedtexture and I positioned at one of the two lights in the observation room.
I have assigned to projectedtexture name: light_room and the flags are set to Enabled = on, and the second option off.
Then I created a logic_auto (OnMapSpawn-> light_room> TurnOff)
then I created a logic_relay (OnTrigger-> light_room> TurnOn).
Finally, in front of the entrance door to the room, I placed a brush with trigger_multiple output (OnStartTouch-> "the logic_relay that controls the light" -> Trigger).
When I start the level and opens the door of the first room, the light is on! Instead must remain turned off until the trigger_multiple through. What was wrong?
Quote from Ragnarox97 on July 29, 2014, 2:20 pmI've tried setting the Enabled = off, but it does not work the same.
Solved!
I've tried setting the Enabled = off, but it does not work the same.
Solved!
Quote from josepezdj on July 30, 2014, 1:51 amSome things:
1. You can only have one active projectedtexture at a time. If one is active and you fire an output "TurnOn" to another projectedtexture, the engine will set the first one OFF automatically and will turn the latter one ON.
2. The flag "Enabled" in your projectedtexture only means to "start ON when you start the map", and it won't do much since the first projectedtexture that is ON is the one at your entry elevator shaft, ok?
3. The most important property you must check out in your projectedtexture is the "Enable Shadows" one, don't forget to always set it to YES. From there, you'll only need to fire the "TurnOn" output.
4. When working with (not collapsed) instances, you should name the entities inside them with an @ at the beginning of their name (i.e. "@light_room", "@light_room_relay"...); this will make their names to not change during compile, and you'll be able to fire them outputs directly by name. So in your case, you can use the following output in a trigger_once (not "_multiple") at your entry door:
OnStartTouch > @light_room_relay > Trigger
5. Finally, you can extend the projected shadows by increasing the value at the property "FarZ" to a value of for example 2000 or 3000 depending on your room size. Also, you can increase its "Brightness Scale" to a value of 4.0 or 5.0 for example. And you also increase the "Light Color" last value which is the colour intensity (i.e. 255 255 255 1200).
Some things:
1. You can only have one active projectedtexture at a time. If one is active and you fire an output "TurnOn" to another projectedtexture, the engine will set the first one OFF automatically and will turn the latter one ON.
2. The flag "Enabled" in your projectedtexture only means to "start ON when you start the map", and it won't do much since the first projectedtexture that is ON is the one at your entry elevator shaft, ok?
3. The most important property you must check out in your projectedtexture is the "Enable Shadows" one, don't forget to always set it to YES. From there, you'll only need to fire the "TurnOn" output.
4. When working with (not collapsed) instances, you should name the entities inside them with an @ at the beginning of their name (i.e. "@light_room", "@light_room_relay"...); this will make their names to not change during compile, and you'll be able to fire them outputs directly by name. So in your case, you can use the following output in a trigger_once (not "_multiple") at your entry door:
OnStartTouch > @light_room_relay > Trigger
5. Finally, you can extend the projected shadows by increasing the value at the property "FarZ" to a value of for example 2000 or 3000 depending on your room size. Also, you can increase its "Brightness Scale" to a value of 4.0 or 5.0 for example. And you also increase the "Light Color" last value which is the colour intensity (i.e. 255 255 255 1200).
Quote from Ragnarox97 on July 30, 2014, 5:42 amThank you
In fact, I did not understand why when I could run a projectedtexture, the other did not work more. And the fact of the @ I could not understand, but now I understand it. I think I'll make a text file written with all your advice
I played your maps and I see that you are good to use the hammer.
Thank you
In fact, I did not understand why when I could run a projectedtexture, the other did not work more. And the fact of the @ I could not understand, but now I understand it. I think I'll make a text file written with all your advice
I played your maps and I see that you are good to use the hammer.