Jedynak Posted May 3, 2013 Share Posted May 3, 2013 My English is weak, so I use a translator Hi, I need a little assistance in the optimization of their scripts. Now, how to write them most optimally? I know the LUA, but with this I have a big problem. How to do: - Correct triggers - When you want to assign something, use the variable, and can setElementData array? - Have any way to replace loops something else, give August wogole right? In addition, it would be nice to hear your advice, what to avoid that these scripts run smoothly! Thank you. Link to comment
0 Jaysds1 Posted May 4, 2013 Share Posted May 4, 2013 One of the biggest things to do, to make your script run smoothly is to always have a local variables that you're going to use later on. Link to comment
0 ixjf Posted May 11, 2013 Share Posted May 11, 2013 My English is weak, so I use a translatorHi, I need a little assistance in the optimization of their scripts. Now, how to write them most optimally? I know the LUA, but with this I have a big problem. How to do: - Correct triggers - When you want to assign something, use the variable, and can setElementData array? - Have any way to replace loops something else, give August wogole right? In addition, it would be nice to hear your advice, what to avoid that these scripts run smoothly! Thank you. For the first question, there isn't much to tell. Simply avoid triggering too many events repeatedly and sending too much data at once (a few megabytes, not kilobytes) - that could cause a network trouble. Regarding loops, it depends much on the context - e.g. if you are just trying to find a value in a table and the table's values are in an ordered way (must be numbers), you can use the binary search algorithm. As for your second question, I'm sorry but I didn't understand it. Link to comment
0 dzek (varez) Posted May 13, 2013 Share Posted May 13, 2013 Have any way to replace loops something else, give August wogole right? Fixed translation: Is there any way to replace loops with something else, is this even possible? He can't write proper Polish, so translation is even worse than it should be. He already posted same question in Polish section. I don't understand why he tries to remove loops completely. And what does he mean by "loops" (as there are many loop statements). Link to comment
Question
Jedynak
My English is weak, so I use a translator
Hi, I need a little assistance in the optimization of their scripts. Now, how to write them most optimally?
I know the LUA, but with this I have a big problem.
How to do:
- Correct triggers
- When you want to assign something, use the variable, and can setElementData array?
- Have any way to replace loops something else, give August wogole right?
In addition, it would be nice to hear your advice, what to avoid that these scripts run smoothly! Thank you.
Link to comment
3 answers to this question
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