Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
But I need to write a conditional to turn it back off with that same lever, so I need to check it's state. I can't figure out the function to retrieve that information.
Is there universal function that I can test the state (retrieve it's value) of anything within an object?
I must be overlooking something extremely simple.
Last edited by NutJob on Tue Oct 21, 2014 7:43 pm, edited 1 time in total.
But I need to write a conditional to turn it back off with that same lever, so I need to check it's state. I can't figure out the function to retrieve that information.
Is there universal function that I can test the state (retrieve it's value) of anything within an object?
I'm actually working on that, in a script_entity I have that copy paste on Basic Scripting that is called easy commands I'm working on adding a ton of new code for just fiscally getting if something is enabled or not
function sayAmsg(entity)
hudPrint(entity.go.id)
end
All connectors send function(self).
( "self" isnt visible in editor during making connector )
I use it in JavaScript I write, always. In that language it'll return the element and all it's properties that made the method call. I expected this would behave the same, but I'm not getting the results back due to [????].
So I just put a scalar into the function header? "entity" then I can use the properties from the object making the call?
function sayAmsg(entity)
hudPrint(entity.go.id)
end
All connectors send function(self).
( "self" isnt visible in editor during making connector )
I use it in JavaScript I write, always. In that language it'll return the element and all it's properties that made the method call. I expected this would behave the same, but I'm not getting the results back due to [????].
So I just put a scalar into the function header? "entity" then I can use the properties from the object making the call?
This is lua not javascript and another thing, well what are you trying to get with the hudPrint?