It looks like you're new here. If you want to get involved, click one of these buttons!
[Splash]
ChildList = Orx # EpicMinds
[Orx]
Graphic = OrxGraphic
Position = (0, 0, 0)
[OrxGraphic]
Texture = ../data/splash/orx_splash.png
Pivot = center
[EpicMinds]
Graphic = EpicGraphic
Position = (0, 0, 0)
[EpicGraphic]
Texture = ../data/splash/epic_splash.png
Pivot = center
Comments
Something like:
Will result in delayed object creation for EpicMinds. Keep in mind that when you do this, Splash won't be the parent of neither Orx nor EpicMinds (and in this example when Splash is deleted at time = 4, both objects will remain) so if that's important for you you can still use commands such as Object.SetParent/Object.SetOwner, like this:
You can of course have different FXs on objects, different lifetimes, etc to achieve exactly what you want.
I didn't know you could add code like that into inis. I remember seeing it in MushroomStew files, but that's it. Is there any way I can learn more about the code I can use inside inis? Any specific syntax? It doesn't look like anything I know or would do.
It's the combination of two recent modules: timeline that allows to define sequences of events sent over time and commands which can intercept those events and link them to internal commands.
New commands can also be added at runtime by the user or interpreted directly. It'll be the base for a console module that I haven't started yet.
Here's the thread that started it all 3 months ago: https://forum.orx-project.org/discussion/3955
I've been using timelines/commands a lot lately for making a generic UI system that a friend and myself are using in our current game made with orx/scroll. He's making all the buttons/menus/tutorials via config using commands like this.
There's no easy way to know the list of available commands right now unfortunately beside having a look at the code, but you can look into these files: orxObject.c, orxConfig.c, orxLocale.c and orxMouse.c and look for functions ending with _RegisterCommands().
I'll soon add the option to query commands at runtime and probably a new wiki section.
You can try my fade tests here:
http://webfiles.mhyre.com/orx/fadetest.zip (1,68 MB)
If you use a lower case x, the event doesn't match to a command at all, so the command module doesn't try to evaluate it and won't complain, hence no error displayed in that case.
Here's what you currently have, Mhyre: Which translates to:
- Create object BlackSplash and push it twice (on the stack)
- Pop it and delete it (with an extra parameter that won't be interpreted: ^)
- Create object OrxSplash and push it twice
- Object.AddFX with wrong parameter
- etc...
So in addition to the incorrect AddFX, you also delete the BlackSplash as soon as it's created and you keep its GUID on the stack (pushed twice, popped once).
Here's probably what you want:
Or, even simpler, by using regular object config properties:
The problem I had was that the orx splash image was showing up really fast before the fade FX would kick in, which is why I was loading then deleting the black splash object, which is just a black image. I didn't even see I pushed it twice
That looks much more efficient to me. Does the lifetime property imply that the Splash object will be deleted automaticly?
EDIT: I guess it does. Now I only have a few problems with using "CreateObject" in classes, to switch from the splash screen to the actual menu, and do more things later on.
Any details on the problems you have?
OrxScroll is the main class, includes Scroll.h
Splash is the splash screen class, includes OrxScroll.
I can send you the project if you want, but Splash is a public ScrollObject, and I can't do anything with it. I'd like to create the menu object in the OnDelete callback of the splash object.