Download

somewhat unique problem: how would you solve?

Hey gang, Blueprint newb here.

I have external data (.csv) i need to import and use to drive a series of particle effects. My test is a couple hundred lines with values of 1, 2, or 3. The idea is that if 1 then fire a single particle from ‘Emitter_Red’, if 2, then fire Emitter_Green etc.

Basically i want to trigger a single event that then reads through the entire .csv and fires off the couple hundred particles (from 3 emitters) driven by the external data. So 1,1,1,2,3,1,1 would trigger red, red, red, green, blue ,red,red. I’m making unique particle systems for each (as opposed to driving some value inside a single particle system).

I’m using Data Tables based on this basic tutorial https://www.youtube.com/watch?v=nMy6H1o1zO0 but not sure thats the right approach. Both high-level and detail / specific suggestions appreciated. Thanks!

Is this what you’re after:

Capture.PNG

Not sure where the 3 emitters come here but this should read every row from the DT.

Thanks! Yeah, i have something like that (see below); my main problem now is getting it to increment the eventID through the ‘3particles’ array (see left of image) to then Spawn one of each of the emitters per line. Print works, so i have first part solved (getting second column in).

How do i get it to change the Index each time, and then fire off one of three different emitters?

thanks in advance!

so, making progress, got emitters happening, but for some reason it just spits out huge globs of particles at once…so i added a delay. Now, i get 1 red, 1 green and 1 blue, then 1/2 second later, same thing…regardless of what is in the datatable. It’s almost like the delay is screwing up the for next loop? i get one of each color over and over. Any thoughts?

try moving your delay to be after the for each loop.

thanks Thuranius, but tried that. I’ve put those delays everywhere and either i get a) a huge clump of all 500 lines from the DT firing at once or b) RED, GREEN, BLUE over and over and over where somehow the delay seems to bork the loop? the first 3 entries in the table are red, GREEN GREEN, so i’m not sure how i’m even getting RED, GREEN, BLUE at all…i’ve also tried moving to a switch approach, but the results are the same…delay either causes RGB over and over, or no delay causes clumping of all 500 simultaneous.

To control spawning rate, have a function/event timer increase the index and then pull it out of the DataTable. Something like this perhaps:

Capture.PNG

Not entirely sure what your vision is. I might be missing the point completely. ;p

Hmmm, some new concepts there i’ll try your suggestion Everynone. The “vision” is i want to use a single column (column B) of my DT to fire off one of three particles…It consists of 500 lines, each line is either a 0,1, or 2. I need it to take…say 5 seconds to step through those 500 lines of DT (spawn 100 particles/second each one from the DT). I’ve got everything working with above approach, but it ‘clump’ fires all 500 at once. Delays anywhere seem to bork it. Looks like your method with ‘Set Time by Event’ may address this.

Everynon, I got this far:

Couple questions: what is that SET off the ‘Set Timer’ ? I coudn’t figure out how do make that.

Mainly, how does your ‘Get Data Table Row’ have more options than mine? I dont have ‘Out Row ID’ as an Int, specifically. Finally, how did you add another Option to the Select node?

Sorry for the super-newb questions…

It’s a timer handle; in case you want to stop/reset/alter/see how much time is left - allows you to interact with the timer, a reference. You can right any *ReturnValue *and *PromoteToVariable *rather than create reference manually.

Let’s say you want to stop the timer when you run out of DataTable rows:

Capture.PNG

You can right click any struct pin and Split/*Recombine - *it sometimes saves screen space. You can drag a wire and break struct, same thing.

Right click and AddOption.

It seems that right click solves all the problems today :slight_smile:

I thought I saw EventID int in one of your screenshots.

thanks for the help everyone; i learned a ton. The biggest issue i ran into was the ‘clumping’ or firing off the entire .csv file’s worth of emitters in a single tick. It turns out i had to rebuild the loop as a custom macro, here’s what i wound up with for those interested:

And then inside the macro…

hope this helps someone,

Not sure if this helps but I was having a similar issue with wanting a delayed ForEachLoop. If you double click a ForEachLoop you can copy the node setup and create a new macro and then add a delay to make a custom delayed ForEachLoop.

I don’t see it mentioned often but you can adjust the Tick Interval, too: (class settings)

Untitled.png