UPDATE: I seem to have fixed it with smoke and mirrors. I added a binary numeral var which is not toggled until all of the characters are created. This toggle causes the variables to be set, but is positioned in such a way that they must be getting set on the tick following object creation.
With the permission of the moderators, I'd like to leave this post in place for anyone else struggling with this issue. I wasted several days on it. I'm also hesitant to believe I actually understand what's going on.
Hello all. I've been wrestling this for days, and scouring the forums and manuals, so I beg your pardon if this has been addressed elsewhere.
I am trying to use Create Object to spawn several characters at once, then set instance variables for each of them within the same tick. I know that the first spawned object will be IID 0, because I destroy all objects at the start of the layout.
The system seems to be either overwriting or completely ignoring those instance variables. I'm setting a text field to verify what's going on, and I get different results within the same tick depending on where that text is set.
In the attached image file, everything works fine, and all the instance variables seem to be properly assigned. If, however, I move that Set Text event anywhere else in the program, including the blank sub event at the end of the attached image, the only instance that retains it's setting is whatever instance I pick first. I know it isn't just the Set Text that isn't working, because I'm tried retrieving the instance variables with subsequent mouse clicks, and those results match the Set Text's output.
Is it just impossible to pick instances in the same tick as creation of the instance? That doesn't seem entirely true, given the positive results I mentioned. I have no idea what is going on here...