Scripts / Move Lights via LUA?

Author
Message
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 1st Sep 2018 18:03
How do you move a light in Game Guru via LUA? I have tried using the same methods for entities but all that does it move the light object in the editor and keep the light emission in its original position. Oddly enough when you go back to the editor the light object's position will now be moved to where you have set it in lua during test play. But the light emission still remains unmoved.

I'm not entirely trying to make light move in an animated sense. But more so re-position it on the screen. Is this possible?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 1st Sep 2018 18:31


I would assume it would be SetLightPosition you need to use.
[img]belidos3d.swgrp.co.uk/wp-content/uploads/2016/03/blogo.png[/img]
Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 1st Sep 2018 18:35
Thanks! AmenMoses just sent me that command i dont know how it passed me in my global.lua scan for it. Everything is working perfectly
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 4th Sep 2018 06:01
While this works great on new maps... it seems to not work at all on older maps?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Sep 2018 09:52
Make sure the light is dynamic and there's no baked information saved
If still not working then try delete and replace the light
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 4th Sep 2018 16:50
All of the above and still having issues with legacy maps even maps made just before the Monster Update. I don't use baked lights by the way.

Even with one of my entirely blank old maps it doesnt work on. but a new blank map it does. Very strange.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960

Login to post a reply

Server time is: 2024-03-28 18:36:24
Your offset time is: 2024-03-28 18:36:24