Scripts / Direct call LUA commands?

Author
Message
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 29th Jun 2016 14:53
In the end of global.lua there is a commented list of so called "direct call LUA commands". Do these exist and how do you use them? For example the list says:

However if I do this:

n returns nil.

Have I misunderstood something?
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Jun 2016 15:13
That should be right, haven't tried that 1 personally but the others seem to work.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 29th Jun 2016 15:14
they work the same as every other function only there declared in C++ and exported to Lua rather than declared in Lua like the rest (which all call the direct call function "sendmessage") but they all work the same way

in this case i would say the function is failing for some reason and not something you are doing, nil values are Lua's way of letting us know something went wrong
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 29th Jun 2016 19:08
Well, I tested with this little scriptoid:

And it gives following result:

Build 1.131. File integrity ok.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Jun 2016 19:55 Edited at: 29th Jun 2016 19:56
put an e in there (tested and working)
i.e.
GetSurfaceBlue(e)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 29th Jun 2016 20:00
I think I already tried that with GetAmbienceIntensity(). I'll recheck that and try with the others as soon as I get back to my pc. Thanks.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Jun 2016 00:06
Quote: "put an e in there (tested and working)
i.e.
GetSurfaceBlue(e)"


Seems odd. Why would you need to specify the entity when the effect is a generic one? As far as I'm aware there's no per entity setting for this. Perhaps the commands are not quite working yet or possibly there will be a way to change surface level per entity in the future? Still, if it works, it works

I've been meaning to update a script of mine to take advantage of these commands, but so far haven't got round to trying them.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Login to post a reply

Server time is: 2024-12-22 18:43:39
Your offset time is: 2024-12-22 18:43:39