|
| 20 Apr 2012 07:39 AM |
instead of for i=0.1,1,0.1 do
stuff wait() end
do it like
for i=0.1,1,0.1 do i=math.sin(math.pi/2*i) stuff end
much smoother animation
umad secret animation magic nibs |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2012 08:18 AM |
| So we have to take out the wait() and make sure we use the loop counter (or whatever it's called) as a variable? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 20 Apr 2012 08:24 AM |
| Ok, so apparently you can do whatever you want to 'i'/counter/thing and the loop runs fine. I didn't know that before. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2012 01:36 PM |
You've made me facepalm at how horrible and unworking your code is twice today.
Are you sure you can even script? |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 20 Apr 2012 03:50 PM |
"Ok, so apparently you can do whatever you want to 'i'/counter/thing and the loop runs fine. I didn't know that before."
Don't just do that whenever you want in other languages though. Only some languages will let you do that, Lua happens to be one of the ones that does let you do it.
I have yet to use it once in real code though. If you do use it take a second to think, since you might me whiting something terrible, like the thing in this post. |
|
|
| Report Abuse |
|
|