Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Numsprites var inaccurate

My code had been depending on this variable being accurate, but apparently it's not! In one map, the var had a value of 407 when there were actually over 600 sprites in the map (which can be easily verified in mapster). I was using Numsprites to check when to stop processing sprites during EVENT_ENTERLEVEL. I could see during the game that a large number of sprites were not being processed by my code. As a substitute, my code now checks all 16384 sprites and just ignores those with a statnum of 1024 -- it works fine now.

EDIT: And before anyone asks -- yes, EVENT_LOADACTOR would be a more natural place to put code that processes sprites before the game starts, but for reasons I won't go into, the code is currently in EVENT_ENTERLEVEL.