Example is in the screenshot below. The event inputs will be used in a function some time after the anim montage blend out, which could be anywhere between 2 to 5 seconds after the event is triggered.
Is it good practice to promote those to a variable at the start of the event? It works fine as it’s set up, but wondering if there’s any unforeseen issues that can arise from using inputs later after the event triggers.
There won’t be any issues, just make sure it goes with what you’re wanting out of the inputs! For example, if you want to lock input after the trigger and unlock it after the “Use Item” function, make a boolean or a gate to keep any extra inputs from changing your event triggering input, then switch it back once the event is over!
I mean its fine but if you aren’t using them straight away why not place a delay if its only being used for this event and nothing else or store soft references of them it seems like a very heavy way to store direct references if its only gonna be used to play something, remember everytime you store object ref it will use memory and you’ll be like why do i have 6gb of ram being used
Thanks! I was just using that screenshot as an example to support the question. The actual event I have is more complex and it has protection against spamming it. I have it set up to use an item only after an animation finishes so if the player is interrupted mid animation you don’t lose your item.