Ok… what’s the deal on light points and turning them off or on? I could not find a script in the toolset that worked so I made one using the Script Generator and it didn’t work either. So does anybody have a simple ga_script for turning on/off light points?
Turn off That Damn Light!
Débuté par
Alupinu
, nov. 17 2010 06:08
#1
Posté 17 novembre 2010 - 06:08
#2
Guest_Chaos Wielder_*
Posté 17 novembre 2010 - 06:21
Guest_Chaos Wielder_*
The SetLightActive function is a bit bugged. If I recall correctly, you need to create the light through the CreateObject command--preferably saving it as a variable or with a unique tag--otherwise the SetLightActive function won't alter the light if the player saves and loads. Either that or changes modules.
I'm not sure on the specifics, mind you, but the light needs to be routed through a script if you want it to be turned on and off.
I'm not sure on the specifics, mind you, but the light needs to be routed through a script if you want it to be turned on and off.
#3
Posté 17 novembre 2010 - 06:36
Light loose their tag when you load from a save game.
A way to have it working all the time is to set light as local object.
A way to have it working all the time is to set light as local object.
#4
Posté 18 novembre 2010 - 04:28
Ok people I did as you suggested. Gave the light local bp and then used the functions create and destroy object to turn off and on the light. Seems to work fine, so thanks everyone for your suggestions and time.
#5
Posté 21 novembre 2010 - 10:17
Thanks for raising this issue. I'm creating a mod where you can light candles, camp fires and braziers, and never thought to test it by saving and reloading.
Thankfully the GetNearestObject function can search for the nearest 'object_type_light' to a specified target. In my case the objects that run the scripts are all right under the lights, so I can use OBJECT_SELF as the 'nearest' origin, although if you wanted to start lights remotely you could always create a waypoint or an ipoint at the same location as the light object and use that as the origin (at least those object types retain their tags).
Thankfully the GetNearestObject function can search for the nearest 'object_type_light' to a specified target. In my case the objects that run the scripts are all right under the lights, so I can use OBJECT_SELF as the 'nearest' origin, although if you wanted to start lights remotely you could always create a waypoint or an ipoint at the same location as the light object and use that as the origin (at least those object types retain their tags).
#6
Posté 13 décembre 2010 - 06:00
I know this thread is a bit old, but kudos to Shallina for posting the solution to the light problem that has persisted since the beta version of my Nihil Module. My sincere thanks.





Retour en haut







