# Randomize a beams target position?

**URL:** <https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538>\
**Category:** FX\
**Tags:** target, particle-systems, unreal-engine, question\
**Created:** [September 26, 2016, 10:34am UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538 "2016-09-26T10:34:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_14328f7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_14328f7e](https://forums.unrealengine.com/u/anonymous_user_14328f7e)\
**Post date:** [September 26, 2016, 10:34am UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/1 "2016-09-26T10:34:34Z")

</div>

Hi there! I’m currently new the the unreal engine and was wondering if if could randomize the target position for a beam particle system. I’m trying to create a beam effect that strikes in a different place each time, or at least alternate between two different vectors. Wouldn’t be surprised if I missed a setting somewhere. Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Speckulous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Speckulous](https://forums.unrealengine.com/u/Speckulous)\
**Post date:** [September 26, 2016, 12:01pm UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/2 "2016-09-26T12:01:14Z")

</div>

Could you provide a screenshot of your current BP?

You should implement a parcticle beam function to only one point, then you can extend it to a random location.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_14328f7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_14328f7e](https://forums.unrealengine.com/u/anonymous_user_14328f7e)\
**Post date:** [September 28, 2016, 8:54am UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/3 "2016-09-28T08:54:50Z")

</div>

Hey Speckulous,

Thanks for the advice, was just wondering if I would could do it from the emitter’s side or if you would have to make a separate script. Never used blueprints before, but took a pass at it and in the end got it with a simple randomize function. Thanks again!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_14328f7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_14328f7e](https://forums.unrealengine.com/u/anonymous_user_14328f7e)\
**Post date:** [September 28, 2016, 9:02am UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/4 "2016-09-28T09:02:57Z")

</div>

Randomize function

 ![108748-farts.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/5/cd567e22d43645e3e53134f8fe6ee2879321b571.png)

---

<div class="post-metadata">

**Author:** ![Speckulous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Speckulous](https://forums.unrealengine.com/u/Speckulous)\
**Post date:** [September 28, 2016, 9:48am UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/5 "2016-09-28T09:48:21Z")

</div>

I didn’t try that out, but doesn’t that give you a new lightning every tick (you have a delay, but that only, well, delays the event), so you have like the first 0.5 secs nothing and then all the time?

I would approach more like this, where the beam function is like your SetActorLocation

 ![108752-beamdelayedatrandpos.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/6/b86a219783500ba3658905b4b052d9856ecf6a55.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_14328f7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_14328f7e](https://forums.unrealengine.com/u/anonymous_user_14328f7e)\
**Post date:** [September 30, 2016, 9:11pm UTC](https://forums.unrealengine.com/t/randomize-a-beams-target-position/371538/6 "2016-09-30T21:11:20Z")

</div>

Yeah, the delay was for a flashing effect and just timed my beam’s lifetime up with it. So each flash, it’ll change the target position each cycle.  
Yours looks like a better way to do it. Not sure where you’re getting the wait for next beam node though?
