Why does game pause when reading from a table?
Hello
I have actors that base there image of a table. There is over 20 actors doing so. there are 40 rules in which it tells the actor what image it should display. Picture a game with tiles and each tile is an actor that displays a bit of grass ect.
The table contains values already set in place.
I also have a new table that has different values that gets copied into the first table after 3 seconds. Hence the images should change after 3 seconds.
Testing this out on viewer it seemed to change a lot longer then after 3 seconds.
So I Made another actor that says every one second change value to plus one. Hence acting like a stop watch.
I then tested again and the stop watch actor stayed in zero for about three seconds before counting. Gets to 2 and freezes (three is when images change) and then it waits for a while, then it displays 5 seconds and the images change.
So I am thinking it's the time it takes to read the 40 rules on the 20 actors.
But that's all the code I have so what should I be doing. Is there another way or is this normal?
Thanks
I have actors that base there image of a table. There is over 20 actors doing so. there are 40 rules in which it tells the actor what image it should display. Picture a game with tiles and each tile is an actor that displays a bit of grass ect.
The table contains values already set in place.
I also have a new table that has different values that gets copied into the first table after 3 seconds. Hence the images should change after 3 seconds.
Testing this out on viewer it seemed to change a lot longer then after 3 seconds.
So I Made another actor that says every one second change value to plus one. Hence acting like a stop watch.
I then tested again and the stop watch actor stayed in zero for about three seconds before counting. Gets to 2 and freezes (three is when images change) and then it waits for a while, then it displays 5 seconds and the images change.
So I am thinking it's the time it takes to read the 40 rules on the 20 actors.
But that's all the code I have so what should I be doing. Is there another way or is this normal?
Thanks
Comments
I would guess you have image(s) that are very large or that there is some data corruption in one of your tables... maybe a symbol or control character or something else that GameSalad doesn't like. I've even seen corrupt audio files cause this exact issue.
So my recommendation would be to strip out all images and sound (obviously, do this with a COPY of your project file because deleting images from the library can have unforeseen consequences) and see if it makes any difference.
If that doesn't help, try re-importing the table data or checking it more carefully.
Thank you for the answer, my best bet is that something is corrupted. By re importing all images again it still didn't work or change. So I tried a different method, copying the cells separately and it has a 1 second delay instead of 3 second delay when changing image.
Although it works fine it's annoying have to wait a second to do an action.
So I will keep creating copies and see if I can change the result by importing images again or adding a different table ect.
Thank you for help
Elfizm