havenphillip Posted June 16, 2018 Share Posted June 16, 2018 How do I interact with a script I've imported into another script from that second script? Quote Link to comment Share on other sites More sharing options...
Yue Posted June 16, 2018 Share Posted June 16, 2018 4 minutes ago, havenphillip said: How do I interact with a script I've imported into another script from that second script? import("Scripts/Menu.lua") Quote Link to comment Share on other sites More sharing options...
havenphillip Posted June 16, 2018 Author Share Posted June 16, 2018 Ok so I can just call it like "self.menu"? Quote Link to comment Share on other sites More sharing options...
havenphillip Posted June 16, 2018 Author Share Posted June 16, 2018 My idea is if I can create a single bounding box script and have different scripts call on it that way I can make multiple use of it, but how would I call the bounding box script in another script? Quote Link to comment Share on other sites More sharing options...
Rick Posted June 16, 2018 Share Posted June 16, 2018 If that script just has functions in it then you can just call the functions as the import of the script will define the functions to be used. You can't just import an LE entity script like that and use it though. There are ways to get "classes" so you can do a self.whatever though. If you aren't an object oriented person then just define normal functions. Quote Link to comment Share on other sites More sharing options...
havenphillip Posted June 17, 2018 Author Share Posted June 17, 2018 OK I'm going to have to keep looking at this to see if I can understand what I can get away with and what I can't. There's a few examples floating around but this is new territory. I feel like I'm about to level up. Quote Link to comment Share on other sites More sharing options...
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.