I have a function called ‘LockOn’ that makes a guard that spawns maintain focus on the player. But I can’t figure out how to make a function that subscribe to an event.
The ‘MaintainFocus’ function is what requires the ‘Focus’ function to have .
Is there any way to an asynchronous function subscribe to an event?
I appreciate any advice. Thanks!
The error message states:
This function parameter expects a value of type agent->void, but this argument is an incompatible value of type type{_(:agent):void}.
You can’t directly put a function with suspends effect on epic-made devices. You might want to use spawn{} inside a function with no suspends effect on it so you can call that function. Here is an example: