• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Solved

L

LEFTazs

Guest
Someone delete this, I have no idea how to do it.
 
Last edited by a moderator:

samspade

Member
A couple questions:
  • What is the while condition, e.g. what continues this loop and what eventually terminates it?
  • What does string_split do? Specifically, how does it advance in each iteration of the while loop or does it pull the same data each loop? What type of information does it pull?
  • What is troopHexa? It seems to be an instance id but more on that later.
  • Troop.position = troopHexa doesn't make sense. Why are you assigning an instance id (if that is what troopHexa is) to troop.position. Shouldn't this troop.position = troopHexa.position?
  • Same question with troopHexa.troops = troop. Is there a reason to assign an instance id to troopHexa.troops?
  • What is the remainder of the code?
  • What is supposed to happen?
It actually seems likely that the issue is in the portion you didn't include. While I'm not exactly sure what is supposed to happen, you've said what isn't supposed to happen is the new object isn't supposed to get the values of the old object. But the code you've shown is a loop which assigns data to an object but doesn't show how it gets that data or how it advances - which seem like crucial pieces of information if the problem is that it keeps overwriting data.
 
Top