Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthorxraven13
    • CommentTimeFeb 13th 2010 edited
     
    Not sure am i using it right, but all particles made by emitter have same color (color is set when emitter is made and then all particles have that color)...
    So does anyone have idea how could i make that each time particle is made that random color is set for him.. I don't want that color of particle is changed after, only once when its born ( or maybe just after its born )

    p.s. i did set 2 different intervals , i tried many values but same results..
    • CommentAuthorxraven13
    • CommentTimeFeb 13th 2010 edited
     
    Ok i traced now particle.color in initialize method of ColorInit... It seems that colors are changing.. But why then all particles that are on the screen have the same color???
    • CommentAuthorxraven13
    • CommentTimeFeb 17th 2010
     
    Here is the code i am using so take a look please :
    http://pastebin.com/mb01edab
    • CommentAuthorxraven13
    • CommentTimeMar 2nd 2010
     
    Please anyone.. My project is stuck because of this problem :(.. And i really can't find the solution
    • CommentAuthorRichard
    • CommentTimeMar 30th 2010
     
    Hi

    Sorry for the delay - lots of work plus speaking at 360Flex and going on holiday means I haven't been around for a while. The ColorInit initializer selects from a range of colors by interpolating between the two colors you give it. If you give it black and white as those colours, you will get something between black and white - i.e. a shade of grey. Not a fully random colour. To get a fully random colour you'll need to create a custom initializer. Alternatively, you could use the ColorsInit initializer (note the s) which takes an array of colors and will pick one of those colors at random.

    I hope this isn't too late to help.
    Richard