Skip to main content

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

ThisHands

3
Posts
2
Topics
A member registered Feb 17, 2024

Recent community posts

Hi, i would like to make it so the units that had a higher speed variable would go first instead of being random, i tried using array sort but i get this error 

############################################################################################ ERROR in action number 1 of Draw Event for object obj_battles: trying to index a variable which is not an array at gml_Object_obj_battles_Draw_0 (line 10) - var _unitWithCurrentTurn = unitTurnOrder[turn].id ############################################################################################ gml_Object_obj_battles_Draw_0 (line 10)

this is how i tried it: 

unitTurnOrder = array_sort(units, function(a, b){

return b.speeed - a.speeed;

}) (there's three e's on speed because the text would turn green).


The other feature i would like to add is to choose the actions first and then all the units do their actions. Thanks :)

Thank you for answering! Solved, hope you have a good day <3 

If floating text appears, the battle text goes upwards for some reason. But if floating text doesnt appear the battle text works and stays in the same position, don't know what to do to fix this.