Save, Store input variable to prevent change after delay

The issue arises when, during a 1-second delay, a new element spawns which leads to a change in the input that was initially set for the custom event. This results in the custom event, once the delay is over, calling the function with the changed input, rather than the original one. Essentially, the input to the function gets overwritten if the custom event is triggered again during this delay.

So far, I haven’t found a workaround to ensure the input remains unchanged during the delay period. I’m looking for a way to “lock in” the input once the custom event is initially called, regardless of any changes that occur during the waiting period.

How can I ensure that the inputs for my function remain consistent and are not affected by any changes that occur while waiting for the delay in the custom event? Is there a technique in Blueprints to preserve the state of inputs for each separate call?

(The exec (trigger) comes from SpawnActor Grabbable Small Cube)

1 Like

This node :slight_smile:

image

Thank you for your response.

I think I was not clear enough. I want to do spawn multiple Actors, but each Actor should be affected (Size change) after a delay of 1 second.

Currently, a new spawned Actor will overwrite the last spawned Actor, and I can’t find a solution to keep the reference to the original Actor.

This is what I tried (now), but it’s only modifying the last spawned Actor.

Ah, in that case you need to make the spawned object a blueprint, which contains code to wait for 1 second, then set its own size :slight_smile:

Thank you so much @ClockworkOcean that worked!

1 Like

:+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.