I am trying to spawn a set of actors through SpawnActor, which works fine, then use CursorOver events to track when any specific actor is being hovered on or not. I cannot figure out how to make this work, I have a few other CursorOver events set up the exact same way, with actors that aren’t spawned, and they work fine.
Is it possible to use OnBeginCursorOver with a group of spawned actors?
When actor is in level before starts you set the cursorevent from it because it ever exists. It is specific to this actor and set on start level. When actor is spawned there is no reference yet to the specific actor you want.
I haven’t use since long time so i am not sure of the exact way but you need to set a reference from return value after spawn and use it to specify wich actor is in the cursorevent (maybe in touched actor output but not sure edit : i would try a cast to and compare with reference )
Okay, I will try casting, but I have never used it before, what would I be casting? The Cursor event, which would go into the other BP and trigger something? Or do I just use casting to reference the actor, and keep the nodes that control the timer in the level blueprint?
I had not used it since a long time so i had to search a bit. Here is the idea . I created a top down project. used cube 26 (on the right ^^ ) to test cursor over normally (typing over when selected in level) then adding it in level blueprint and creating a bind from reference of the cube (typing cursor and select assign from cursor event), adding event begin play on bind and print string on event.
As it worked i replaced reference by spawned actor.
Edit : yeah finally no cast but a bind ^^
I’ve got this working now, thanks! However, it seems to only be firing the OnBegin event once, instead of a constant hover check