View Single Post
  #853  
Old 01-22-2011, 05:51 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Well, currently, I have an emitter with a single particle type which emits text (which is always different) as a particle whenever certain conditions are met. The particle count can jump pretty high, too, so there's lotsa text sometimes. I can't really do that with multiple particle types, since I don't want to create a ton of them. With v5 it works just fine, changing the emitter.particle attributes before emitting the next particle. Using v6, all particles update when changing the attributes

Edit: Code example:
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
with (findImg(200)) {
    
layer 6;
    
    
with (emitter) {
      
nrofparticles 1;
      
emitautomatically false;
      
      
with (particle) {
        
style "br";
        
zoom  0.9;
        
        
font "Arial";
        
textshadow  true;
        
shadowcolor = { 00};
        
        
speed 0;
        
lifetime 1;
      }
      
      
addLocalModifier("range"01"y""add", -48, -48);
      
addLocalModifier("range"0.51"alpha""add", -2, -2);
    }
  }
}

// called by something
function onStuff(s) {
  
findImg(200).emitter.particle.text s;
  
findImg(200).emitter.emit();

Reply With Quote