Guest User

Untitled

a guest
Aug 1st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AttachEmitterToSocket(Full Path, Socketname);
  2.  
  3. function AttachEmitterToSocket(ParticleSystem Effect, name SocketName)      //should be used for attaching permanent particle effects ie thrusters, lights and similar
  4. {
  5.         local ParticleSystemComponent EffectTemplate;
  6.  
  7.         if(WorldInfo.NetMode != NM_DedicatedServer)
  8.         {
  9.                 if (Mesh != None)
  10.                 {
  11.                         EffectTemplate = WorldInfo.MyEmitterPool.SpawnEmitterCustomLifetime(Effect, false);
  12.                         EffectTemplate.SetAbsolute(false, false, false);
  13.                         EffectTemplate.bUpdateComponentInTick = true;
  14.                         EffectTemplate.SetTickGroup(TG_EffectsUpdateWork);
  15.                         Mesh.AttachComponentToSocket(EffectTemplate, SocketName);
  16.                 }
  17.         }
  18. }
Add Comment
Please, Sign In to add comment