Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm trying to make a character sprite's animation change during a dialogue scene. The dialogue is contained in an array, and so far the only way I've been able to do this is by using separate "set animation" events, which is very inefficient. I've tried using loops and loopindex but don't have enough experience to go it to work. Any help would be really appreciated.
You should probably store animation name in the same array (in another column/row). When you get a dialogue option from the array, also extract the animation name and play it.
I have the animation names in the Y1 row beneath the dialogue at Y0. I'm still fairly new to arrays and can't work out what action I need to use to get the animations to play. I'm assuming it's Array.At and the sprite object but am clearing missing something.
Develop games in your browser. Powerful, performant & highly capable.
How are you displaying your dialogue?
Assuming you have something like set text to array.at(x), in that same event you would add the action to set animation to array.at(x,1).
It's working now. I'd been using both X and Y coordinates in the action block, using only X is displaying the animations. Thanks, this issue had been bugging me for a while.