and that works fine. However I’m trying to make the actor walk around with the call to the Random Roam event (as in above picture) but nothing happens. Random Roam function:
If I a place an actor in the world and start, then the this actor will start walking around.
What am I missing? How come I can’t call ‘Random Roam’ from the button blueprint?
I’ve tried making a variable and setting it to the spawned actor. Also tried calling ‘Random Roam’ directly from the spawn actor node. Nothing seems to work…
Anyone have any ideas? Any help or tips would be appreciated.
Thanks.
well, quite probably the BeginPlay fires during the Spawn, which starts the Random Roam, the next Random Roam fires, and cancels the first one, and then for some reason fails, and your OnFail isn’t connected to anything so it just appears to stop.
I just tried connecting On Fail to ‘Random Roam’ as well. Doesn’t seem to work.
However the Random Roam event only seems to be firing for the actor I have placed in the world.
Could this be an issue? That somehow it only fires for the actor already spawned and somehow not for newly spawned actors?
I have also tried with no placed actors and removing the Event BeginPlay.
Furthermore also tried removing the Random Roam call in the button blueprint and hoping it will be fired by Event BeginPlay.
Also doesn’t seem to work.
But thanks for another perspective.
I tried some logging:
Ai_C_1 (changed the name from before) is the one I placed beforehand, and it move successfully.
However Ai, Ai2 and Ai3 are the ones spawned from the button, or more precisely it’s the references I get from the spawnActor node. Could it be I get the object references from the spawn actor and not the instance references, as Ai_C_1?
Any ideas how to get instance references instead?