Roland Posted March 12, 2017 Posted March 12, 2017 If have an entity in my scene with a script attached that holds some parameter, something like this Script.param = 10--int and then in my LUA program at some point picks that entity. Is is possible to access the script.param then (at this stage I have only the entity) I made a temporary solution for this that works by using the Get/SetKeyValue like this Script.param = 10--int function Script:Start() self.entity:SetKeyValue("param", self.param) end which allows me to get that param event though I only have the entity local value = entity:GetKeyValue("param") However this feels a bit odd. Maybe there is some better way ? Note: In C++ I could do this using my LuaBridge class, but this project is pure LUA Quote Roland Strålberg Website: https://rstralberg.com
Roland Posted March 12, 2017 Author Posted March 12, 2017 Thanks to Rick that told me how to do local value = entity.script.param Quote Roland Strålberg Website: https://rstralberg.com
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.