Scripts / Slider To Lua Values

Author
Message
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 19th Sep 2019 14:46 Edited at: 24th Sep 2019 21:34
Hi guys,

I read some posts about the "broken" functionality of the lua functions which set slider values, so here is the multiply you need to use slider values in the lua functions:

The term is:
lua_value * multiply = slider value
i.e.
"Fog Nearest" /100.0;
5000 / 100 = 50
and the other way (rearrange the equation)
slider value / multiply = lua_value
50 * 100 = 5000



Update 24.09:
There is now a special case for:
"Vignette Radius"
"Vignette Intensity"
For these two commands you can use the slider values too.

Have a nice day
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th Sep 2019 16:09
nice, i'll have to remember this thread if ever i need to play with those sliders again
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Solar
6
Years of Service
User Offline
Joined: 11th Apr 2017
Location: South Africa
Posted: 19th Sep 2019 20:38
This is very useful, thanks!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Sep 2019 21:29
Bookmarked, thanks Corno_1, nice addiction.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 20th Sep 2019 08:44
Thanks corno_1

Did try some time ago to set fog etc by script, but could not get it right.

Like 5000 - no idea where that number comes from.

So how to set a value of say 2 for fog nearest, or 25 for fog red, or change direction of water etc still makes no sense to me lol.

Will have to have another play....

Reliquia....
aka OldFlak
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 20th Sep 2019 16:21
Quote: "Like 5000 - no idea where that number comes from."

It is the distance to the player. It would be the same if you use the function GetPlayerDistance(fogNearest) (of course the fog is no entity, so this does not work. Just an example to make it clear )
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Sep 2019 23:22
Quote: "So how to set a value of say 2 for fog nearest"

i mean it's right in the example he gave
Quote: "lua_value * multiply = slider value
i.e.
"Fog Nearest" /100.0;
5000 / 100 = 50
and the other way
50 * 100 = 5000"

assuming you mean a slider value of 2 then you set the lua value to 200
(2 x 100 = 200)

for fog_red with a slider value it's 25 x 2.55 = 63.75 (25% of 255 which is the max slider value) so you set the lua value to 63.75
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 24th Sep 2019 21:34
I updated the first post for the new "fix" preben added.
https://github.com/TheGameCreators/GameGuruRepo/issues/615
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Sep 2019 02:53
Thanks Corno_1
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-03-28 17:59:15
Your offset time is: 2024-03-28 17:59:15