3 people have been busting their heads over this one and can't figure it out. We have an object defined as orxOBJECT *player in our code, and we want to grab a pointer to a spawner created in the config file and owned by player.
What we do is call orxOBJECT_GET_STRUCTURE(player, SPAWNER) to get this spawner in the init function right after we call player = orxObject_CreateFromConfig("Object"). However, on the first call to change the properties of the spawner, the program crashes, claiming that the spawner pointer is orxNULL. Why are we not able to get the pointer to the spawner? If we can't is there another way to access the properties of this spawner?
If the section is valid, it probably means you're doing a mistake by mixing release and debug: either you link against the release library and you define __orxDEBUG__ or you link against the debug library and you forgot to define __orxDEBUG__ when compiling your game. But let's check the config first.
We got the spawner mostly working now. We're using it to fire player bullets. Do you know if it would be practical to use the spawner class for something like firing complicated and coordinated patterns, like something you'd see in a top-down shooter game? (If you don't know what that looks like, look up Touhou or RefRain Prism Memories, those are good examples.)
Once again, thanks for all the help.
As for spawners, yes, you can use them for more complex stuff like in bullet-hell shooters. What you spawn are objects so they can have their own behavior. You can also do more advanced stuff by listening to the spawner events and modifying the spawned objects on the fly.
Don't hesitate to spread the word around you! I tried a few times on some game dev-related forums over the past few years but I'm definitely not a very good communicator.