Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Drag and Drop - Brandon Davis

One of the many problems that I've encountered when creating the drag and drop feature was once I added the code to do the swap and calling the function to update the buff HUD with the newly swapped buffs, the buffs were not swapping even though when debugging I saw that the swap was actually happening.


After some further debugging I finally realized the reason for the swap not happening. As you can see from the two screenshots above, I was updating the array but when I went to display the new order I was still getting the original array from the game instance instead of the newly changed one. After asking Dewayne to make a function for me to update the original array with the new one it worked like a charm.


Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.