Hople I'll describe my needs so everyone can get it
It's my first "projet" in ORX and I'm quite confused.
I have definition of object in ini file. It is simple picture, but I want to insert it into scene 9 times with different positions and interact with them separately.
Is there any way to do it without creating 9 objects in config file and creating them with 9 lines of code?
Yes, you can create 9 times the same object in code and then call orxObject_SetPosition() on them, and store the positions in config so as to be able to change them without having to recompile:
Or you can do it all in config and create only one object:
And if you move this object, all the children will move at the same time.
- store every object manually in code when creating them one by one
- store every object by listening to the orxOBJECT_EVENT_CREATE event (and only create the parent object)
- go through all the objects when you need it and find the one you want (orxStructure_GetFirst/GetNext)
- pick the object with orxObject_Pick() using the mouse position, in your case (the picking function looks only for object that have a greater Z than the position you give)
There might be other ways, but I think those are the most common.