I’m currently working on a Level Editor Game, and have a Bug with saving.
It should turn an Array into a String and turn the String back to an Array in another scene. Ive created an text to show the result. It should show the array
But it first says “0”. But if I change no code and press “Update” in the Editor it says “0.0.0.0.0…”(the expected result)
Here is the code
This could mean that the order of some of your events is not right.
But why does the order changes if i press Update
Because it runs again from the start and that somehow fixes your wrong order.
Here’s an example, although I’m not sure it’s valid:
- At the beginning, if variable test = 2 → change tint
- set variable test to 2.
The tint won’t change, but if you update, the variable has been set, so now the tint can change.
Edit: I apologize, I’m not familiar with the array tools extension. ignore what I said. I’m testing your events now. I’m really curious. I originally read your question on my phone and it’s tough to read the wide images. Sorry.
I’m having trouble understanding the sequence. Your text object is set to …Join(“lights”,“.”) but the code shown doesn’t really do anything with “lights”. There’s one mention which converts the array “lights” to the string “light”. As a reminder, the extension only handles scene variables on the output or creation side.
Here’s what I used to get a better understanding of the extension. I kept it simple by using 1 scene and only scene variables.
The Code is to big to upload it as an picture so i cannot do that. I think i have to fix this with testing diffrent things. But thanks for the help.