^thehatsrule^
Group: Members
Posts: 3275
Joined: July 2006 |
|
Posted: Jan. 23 2008,21:10 |
|
Well at least the one based on my last "patch" doesn't seem to have the "line-grav" anymore...
Code Sample | -- based on last code "patch" if distance <= 25 then -- warp it offscreen ball[i]:color(b) -- delete old 2 lines, add if math.random(0,1) == 0 then bx = math.random(0,1)*max_x by = math.random(1,max_y) else bx = math.random(1,max_x) by = math.random(0,1)*max_y end end
| This one make them warp offscreen, but looks 'square-ish' unless you add an additional offset to it (due to choosing a coordinate on the edges of the window box). Not sure how many random()'s you'd want to use.
My previous post's warp just copied the random code that was used at the start where it chooses a coordinate anywhere in the window.
|