Building a search engine for sprites in game, having trouble dynamically updating animations

I’m creating a dynamic search system for items in my game using a single sprite called “ScrollForFoodItem” that changes animation based on a SearchKey.

The issue is that no matter what expression I use, including ChildVariable.Animation, I can’t get the object to actually change animations.

The loop itself is working and I created a debug Text, it shows the correct “SearchKey” and “Searchdata” variables, the animation names are being read correctly for each item. So I know the right values are coming through.

At this point I’m wondering if the problem is the expression I used in the “Change animation by name” action.

Any help would be appreciated.

Your logic seems sound. I recreated it with slightly different names but using the sane concept. I used a text input so I could try different letters. Maybe it’s your array or the animations. Do the array values match the animation names exactly including case? I even used VariableString() which isn’t needed anymore just to test it.

Thank you, maybe it’s my array I may try redoing it from scratch. Edit: Turns out it was my array, the names weren’t exact matches.

1 Like