Log In  

One function to draw a lot of circles? On what basis are drawn bullets?

P#37883 2017-02-27 16:00 ( Edited 2017-03-10 10:55)

i think you want circ or circfill. from the manual:

    circ     x y r [col]
    circfill x y r [col]

        Draw a circle or filled circle at x,y with radius r

or did you want something more involved?

P#37934 2017-02-28 14:26 ( Edited 2017-02-28 19:26)

No, I'm creating a function, but it draws a circle once and clean, but I need to circle all remained.

P#37970 2017-03-01 11:58 ( Edited 2017-03-01 16:58)

Just a code consisting only of circ (), circ (), circ() - stupid.

P#37971 2017-03-01 12:01 ( Edited 2017-03-01 17:01)

may be to create an array and store the coordinates there ...

P#37972 2017-03-01 12:01 ( Edited 2017-03-01 17:01)

i don't understand. what do you need multiple circ calls for?

P#37975 2017-03-01 15:00 ( Edited 2017-03-01 20:42)
function random_circles(number)
  for i=1, number do
    circ( rnd(127), rnd(127), 10)
  end
end

Something like that? If you want the circles to be able to move like bullets you need to make a data structure to keep track of each circle's data.

P#38126 2017-03-09 21:48 ( Edited 2017-03-10 02:48)

maybe you want to show bullet's trail like matrix style? You should consider creating simple particle system then, create and store each particle in array and call draw method for each one in the _draw call

P#38130 2017-03-10 05:55 ( Edited 2017-03-10 10:55)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 19:21:55 | 0.007s | Q:16