so I need a fairly large amount of blueprints to be stored like in an array, so that I can get the one I need and make it do an animation. However it doesn’t work with the “Get (a copy)” node (the animation just doesn’t play, Error: Accessed None trying to read property…), so I need a direct ref. Right clicking and changing this node to “Get (a ref)” doesn’t do anything, as pointed out in many other threads. Taking a Map instead of an array doesn’t work either, because I need this array to be replicated, and Maps can’t be. I have worked on this for days and can’t figure out how to get a workaround. Any help is very much appreciated!
Hi. The example you provided will attempt to set the actor to an invalid index in the array (if the array is empty). Turn on “Size To Fit” in the Set Aray Elem node to fix this. Alternatively, use an “Add” node.
I don’t know if this was the cause for your problem, or if it was just a mistake on the example you provided. You mentioned replication which can be a potential source for the properties being invalid. The example of using a “Get” node to play an Anim Montage should work, provided that the replication is done correctly.
Note that in order for an array of actors to be replicated correctly, both the array in question and the actors themselves need to have replication turned on, and the array need to be set by the server of course.
Omg haha yes, I forgot about the size to fit thing, thank you. So now I did everything as you said and the animation does play. However, I have a “destroy actor” node right after this anim node and plug the same “Get (a copy)” node from the array into it, and it doesn’t work. So the animation is played but the actor doesn’t get destroyed. Any idea why?
Hard to know without more information. Also, why would you want to play an animation and destroy it on the same frame? I suggest you make a new thread about it with more info.