I use it regularly for things that need to exist for the entire game, and hold data, but don't need to run events. A pubsub manager is a good example. Another way to think of it is, if you have a persistent object, that doesn't use any events (e.g. step, draw, etc) you could probably replace it with a global struct created in a script asset.
Would this system work for a particle manager? I know that particle systems need to be cleaned up to prevent memory leaks, but would that be necessary in a script?
It probably wouldn't work as structs don't have step events, or any events, and you normally want that for a particle system, but you can do a similar thing with objects and that might depending on what your possible system looks like.
im a really big fan of gamemaker, I also buyed it, bit I cant get one example where this is effective
I use it regularly for things that need to exist for the entire game, and hold data, but don't need to run events. A pubsub manager is a good example. Another way to think of it is, if you have a persistent object, that doesn't use any events (e.g. step, draw, etc) you could probably replace it with a global struct created in a script asset.
@@SamSpadeGameDev Wish I have seen this a year before, thanks for your shorts!
Wait, so you dont need to out global on it. I got mixed messages when you used global on the top struct but not the bottom ones.
Would this system work for a particle manager? I know that particle systems need to be cleaned up to prevent memory leaks, but would that be necessary in a script?
It probably wouldn't work as structs don't have step events, or any events, and you normally want that for a particle system, but you can do a similar thing with objects and that might depending on what your possible system looks like.