Razer Posted October 3, 2022 Share Posted October 3, 2022 I'm relatively new to PZ modding, and the kahlua tutorials or documents over the internet are quite rare. Let me ask this question: is it possible to access public attributes of public Java classes from lua scripts? I'm sure calling public methods is viable. But there are many public attributes that didn't come with get/set methods, and try accessing them directly causes trouble. For example, "print(obj.attribute)" will always output nil, and "obj.attribute = some value" would trigger errors, which read like the class of obj isn't exposed enough for you to access its attributes. Please tell me if there is a way to make this, really appreciate! Link to comment Share on other sites More sharing options...
Kenneth Posted December 12, 2022 Share Posted December 12, 2022 Hey here is a solution in this post Razer 1 Link to comment Share on other sites More sharing options...
Razer Posted December 12, 2022 Author Share Posted December 12, 2022 3 hours ago, Kenneth said: Hey here is a solution in this post Wow, I didn't know there's a method looks as magical as "getClassField()". This will be very handy if I can't find a more viable method but have to achieve something. Many thanks for your reply! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now