Light Script not working

https://s3.amazonaws.com/gamedev-tutorials/Tutorials/Lumberyard_Basics-Quick_Start_Reference-(07)_Game_scripting_v1.pdf

Following this tutorial, it seems very straight forward. but when I enter my proximity trigger nothing happens.

I have this same problem, everything else in the Tutorial has been great… right down to the last step.

I fixed this earlier by unchecking “OnlyPlayer” in the ProximityTrigger1 properties, but that caused issues with the camera triggering the light as well. So after exiting and restarting Lumberyard, I rechecked OnlyPlayer (putting it back where it was initially not working) and… it started working as expected. Character triggers the light but not the camera.

This seems to be a bug with Lumberyard. Only after restarting did it start working right.

I followed the exacct same tutorial and it did not work for me either… until I modified the cameras settings till it actually was “on” in the editor. I changed the bulb-settings… after that it started to work… magicly.

Hello all, I’ll pass this along so somebody can look into it. Thanks for the heads up.

Once I receive any more information on the matter, I’ll pass it along.

Same thing for me. Closing and re-opening editor did the trick to get it working. No other adjustments were needed.

Doesn’t work initially but if you close the editor, reopen level and play in game mode it works as expected.

  1. Save the project

  2. Close the editor (on my machine it unfortunately freezes during closing, so make sure to save first)

  3. Start the editor, open the project

Now the switch works. It probably has something to do with the player’s identity as being a player not getting recognized unless the state is set during level load?.. I’m just coming up with reasons…

Anyways, I was glad to it work after all. In this video you can see my amazing light on/off action:

https://www.youtube.com/watch?v=EVEkqO-ju9Q

No need to close the editor - just reload the level and it should work. I’ve also found that breakpoints won’t be hit within the Flow Graph when this error occurs - a clue for the future that it’s time to reload :slight_smile: