How to determine if an event is loaded?

(capybara) #1

I’m using loadSampleData to load events between levels, and need a way to know when that’s done. I tried Event::getState for each event, which works for normal events, but that can steal events that are playing. If I use getEvent with INFOONLY the getState is only INFOONLY


(capybara) #2

I just tried checking every Sound in the master SoundGroup for open state LOADING or a disk busy state and this seems to be working so far. Is this a good way of checking for events loading?

(Administrator) #3

Did you try EventGroup::getState instead?

(capybara) #4

I just tried checking the EventGroup now and that seems to work correctly. It was possible for a playing Event to be loading but not have created the Sound yet, so just checking Sounds wasn’t enough. Sorry for the late reply.