I don't have any clue as to what you're trying to say. Are you trying to make the code smaller than that? Because it's already smaller itself. I will try and help you if you want it smaller.
use the context action service or userinpute service, and remember, you dont need to do it in as little lines of code, its better to have something done in 2 secs but take 100 lines instead of 10 but in 10 lines, you should care more about the efficiency and readability of the code.
4 comments
I don't have any clue as to what you're trying to say. Are you trying to make the code smaller than that? Because it's already smaller itself. I will try and help you if you want it smaller.
Is that the full script?
use the context action service or userinpute service, and remember, you dont need to do it in as little lines of code, its better to have something done in 2 secs but take 100 lines instead of 10 but in 10 lines, you should care more about the efficiency and readability of the code.
I'd agree with rad, but if you're trying to make your code neater, use functions.