I have a particle system set up to spawn on the player if a condition is true and to deactivate when the condition is false. It works fine if set directly to a key press event (action event) where pressed spawns it and unpressed deactivates it. But when the same logic is placed into a function, it spawns but will not deactivate. I get an “Accessed none trying to read property” error.
Just to clarify, I am using “Event Tick” to update the custom function every frame. If anyone has a better idea, let me know but it does need to be checked every frame.
Also, on a side note, if connected directly to the key press event, true and false are flipped. But when directly setting the variable on the key press before passing to the branch, true and false are correct.
Any thoughts?
Works… (using key press event)
Reversed… (using key pressed event)
Gives Error… (running custom function with event tick)