No announcement yet.

Beam Particle Systems in UnrealScript

  • Filter
  • Time
  • Show
Clear All
new posts

    Beam Particle Systems in UnrealScript

    I haven't found much on using particle systems dynamically in UnrealScript, just particle system creation itself. Using the UT Linkgun beam particle system, I've come up with:

    	Begin Object Class=ParticleSystemComponent Name=LaserBeam
    	End Object
    This creates the beam, with one end of it on the actor, and the other end going off to what I guess is (0,0,0). How can I change the beam's starting and end locations? I believe I can't change the (0,0,0) end of the beam without attaching it to something like a socket. I'm looking through the Linkgun and BeamWeapon source code and trying to see how it works, but any help I can get here is appreciated.

    If UDK wasn't this dead already I'd say you could have probably figured this out on your own by looking at the LinkGun and if you didn't find it there its superclass but here goes anyway.

    BaseBeam.SetVectorParameter('LinkBeamEnd', vector);

    The same is done in the UTBeamWeapon class (UpdateBeamEmitter).

    If you look at the ParticleSystem itself in UnrealCascade within the editor you'll find a Beam Target in all five emitters. The Targets highlighted with a + are all the same and share the name LinkBeamEnd as their parameter name. You can play around with the values under Target->Target->Distribution->Constant to see the beam curve in the preview window. I don't know why the Target in the "SecondaryBeam_Dup" emitter isn't the same as the others (no + and therefore not linked) but it shares the same parameter name so it works anyways. Because of this you have to change the correct second Target manually as well for the preview.


      UnrealEverything, thank you very much!