Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthoricd2k3
- CommentTimeJul 18th 2008
Hello, first of all, what an amazing class! I've been playing around with it and I absolutely love it.
Basically what I'm trying to do is make an emitter thats properties can be updated in an enter frame. The best example I can give of what I'm trying to do is maybe the particles speed up or get bigger based on microphone input. Does anyone have any suggestions for updating emitter preferences in real time?
Thanks -
- CommentAuthorRichard
- CommentTimeJul 19th 2008
Hi
Both Activities and Actions are called every frame. Activities are used to update the properties of an emitter and Actions are used to update the properties of particles created by the emitter. Flint contains Actions to modify the size or speed of particles (Scale and Accelerate). Although these are not based on microphone input you could use them as a basis for creating your own actions that use microphone input to modify the speed and size of particles.
However, it may be that what you're actually after are custom Initializers. Initializers modify the initial state of new particles as they are created by the emitter. The initializer for size is ScaleInit and the initializer for speed is Velocity. You could create custom initializers based on these that will set the initial size and speed of particles based on microphone input. -
- CommentAuthoricd2k3
- CommentTimeJul 21st 2008
Great! works perfectly, but now I'm wondering is there any way to change a steady counter over time? For example, louder volume = more particles shooting out?
I have an enterframe where I can increment the speed, size, alpha etc, but when I try to increment the counter variable it doesnt seem to take. is the counter called every frame as well? Thanks again! -
- CommentAuthorRichard
- CommentTimeJul 21st 2008
The Steady counter has rateMin, rateMax, and rate (sets both rateMin and rateMax) properties that you can use to modify its rate.
The counter is called every frame but the nature of the Steady counter means that if you set its rate to zero, for example, it will never pick up again - it's optimised for speed and the new rate is picked up on when it emits another particle, not before. So you may need a custom counter too. -
- CommentAuthoricd2k3
- CommentTimeJul 21st 2008
I'll look into it, thanks so much for the help
1 to 5 of 5
