Hello i am a beginner in UEFN and coding and im trying to being invisible for 5sec when i click with a remote device but this happen to me anyone have the correct way to write the code ?
HandlePrimaryButton(Agent:agent):void=
the subscribe event will pass the agent to the function
.Subscribe()
does not accept functions with <suspects>
effect on it as an argument. you might want to use spawn{}
to handle this. Here is how:
StartInvisiblity(P:agent)<suspends>: void=
if (F := P.GetFortCharacter):
F.Hide()
Sleep(5.0)
F.Show()
HandlePrimaryButton(P:agent): void=
spawn{StartInvisiblity(P)}
In that way it should get rid of the error
Thanks you !
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.