How to change the "loading" sign
Jordeyy
Member Posts: 409
Can I make my game show a "Loading" graphic, instead of showing the the rotatring circle ?
Comments
Interesting stuff there. But yes, @CodeWizard, do you see this being more streamlined (and not only android) in the near future?
- Thomas
Here is how you could do.(learned from @imjustmike)
1. Create a new boleean attribute and call it "loading"
2. In the button, or rule that tells the game to change scene add a change attribute behaviour to change the "loading" attribute to true before the change scene behaviour. Place the change scene in a timer set to 0.4 to give the actor time to display before the new scene starts loading
3. In an actor that appears on all scenes (I have a round_rules actor where I house all my rules that is present on every scene in the game - you could use a background actor if you have the same background, or create a new actor) add a new change attribute to change the "loading" attribute to false.
4. Now create you loading actor - create an actor with an image that is the same size as your scene. Give it an image that says loading on it. Then add a rule that says:
If "loading" is true, interpolate self opacity to 1, otherwise, interpolate self opacity to 0.
5. Now place that actor on the top layer of every scene, above all other actors.
This means that whenever you change scene the attribute "loading" is set to true, which shows the loading image. When the scene has loaded, the rule is turned off hiding the loading actor.