Or does this perhaps have to do with my other problem.
I am having problem with my program and I am in middle of a gamejam, hence i cant really start making any large scale approaches to problem solving with only about 3 days left any more.
I think my problem is following:
I am trying to use copytable to make another copy of the level. Thing is, i realised that when i tried to reset the level (if player used quit button in middle), it didnt put stuff back to original places, but kept them in place. I realised that this was because i had been altering the original table. That while i had put enemyx=3 at beginning, in middle of level i used to change that exact enemyx to new one. Hence when it tried to generate the same level again using that same table, that table had been altered.
To get around this problem without doing a lot of recoding, i tried to make copy of the original table to be used in level. However, I believe i know what the problem is. I think I am sending reference that i try to copy.
Code is basically following:
Code: Select all
function myfunc(T_mytable)
T_mynewcopy = CopyTable(T_mytable)
Is there a way to make a copy of this table to which i am sending a reference to?