Hello I have a problem with my addon. I will make a connection with variables between one entity and one file in lua autorun.
In the file of autorun I have this.
[IMG]https://i.gyazo.com/d565cb506cf7c3d66477d1880ab762a0.png[/IMG]
In the folder of my entity in shared.lua I have this
[IMG]https://i.gyazo.com/5b1459290b9fe6070dd851b68c249216.png[/IMG]
And in the init.lua I have this.
[IMG]https://i.gyazo.com/d184f2fc6f072d14d03df148078d130c.png[/IMG]
How I can connect this variable to the lua file in the folder autorun for make a condition?
Thanks.
You could make a ENT:Initialize() function in the shared file, and then refer to it with self.
You don't need to connect anything, just use :GetTextInt() on whatever the variable is for your entity.
What can I solved? With a function ENT:Initialize() in the init.lua in the folder entity?
And how I can use GetTextInt()?
Please could you leave me an example?
Thanks.
Sorry, you need to Log In to post a reply to this thread.