2ima Posted April 16, 2015 Posted April 16, 2015 The thing is: how can I use a variable in one script stated on other script in lua? On example: I have 2 scripts: fps_gun.lua with a variable of ammo_count and a script App.lua with a variable named ammo_ammount. How can I use a ammo_count in App.lua(4example ammo_ammount=ammo_count) Thanks beforehand! Quote
Genebris Posted April 16, 2015 Posted April 16, 2015 To variables in App.lua script you can refer in any other script like this: App.ammo_amount=self.ammo_count 1 Quote
Thirsty Panther Posted April 16, 2015 Posted April 16, 2015 More info here. http://www.leadwerks.com/werkspace/topic/8462-how-to-pass-variables-between-scripts-lua/page__hl__passing%20variables 1 Quote
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.