How to make a complete/failed popup?

Best Answers
-
PsychoticStudios Posts: 101
Making Buttons: For the buttons like menu or next level just add a change scene behavior to the actor of the button and specify which scene to go to. For retry just add reset scene behavior.
Making popup: First we need to find if they failed or not. Set up your game so you can have some way to now if they win or lose so like for the video shown above, if the fish actor collides with target make win attribute true otherwise false. Something along those lines. To make the popup and buttons fly in, have the actor(s) above or to the side of the scene with a rule like... When attribute is = (number or true/false) move to/accelerate towards coordinates for center of screen (depends on your resolution).
Hope this helps
(If you need further explanation let me know because I wrote this kind of weird and hard to understand :P. It's hard to explain. ) -
gyroscope I am here.Posts: 6,598
Hi @rodrigosw94,
Perhaps difficult to explain but easy to do...
Make your two popup graphics, one showing the words Menu and Retry, and the other showing the words Menu and Next Level.
Put them outside of the screen area.
Add transparent actors over the areas (buttons) of the graphics showing the words Menu, Retry and Next Level.
In their Rules (of these transparent actors), put a Constrain attribute in each, constraining their y to the appropriate graphic (presuming the popup is travelling downwards or upwards).
Also put the appropriate Rule in each, i.e When touch is pressed, go to Menu/Next level or Reset scene.
Put a Rule in your first graphic (the one showing the words (buttons) Menu and Retry) something like when game.Switch is true, interpolate to y position (on-screen, where you want it to stop).
Somewhere in-game, when the user has "failed", you set game.Switch to true.
Put a Rule in your second graphic (the one showing the words (buttons) Menu and Next Level) something like when game.Switch2 is true, interpolate to y position (on-screen, where you want it to stop).
Somewhere in-game, when the user has "won", you set game.Switch2 to true.
It's on those lines, I don't think I've forgotten anything - and it probably sounds more complicated than it is. Hope it makes sense for you.
----------------------------------------------
http://davidgriffinapps.co.uk/""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
-
gyroscope I am here.Posts: 6,598
Hi, Move To is fine (I've never had problems, but others have; if you put in round numbers without fractions, it should be OK); but then Interpolate to the position you want is probably better/more reliable.
And as long as you have your attribute "triggers" in place, they will move on-screen. (I.e when the user loses, a boolean attribute is changed to true; as long as you've put When Switch1 is true, interpolate (behaviour) to y in the graphic, it'll move then (similar with the other one).""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
-
gyroscope I am here.Posts: 6,598
Personally, I'd keep your popups moving into the screen with Move To or Interpolate still; I wouldn't link them to the camera.
Interpolate is really straightforward behaviour to use with nothing to worry about! Where it says Interpolate Attribute, click on the three dots and then in the Expression Editor, click on the name of your image > Position > Y. THen where it says To, put the Y co-ordinate where you want the popup to finish on-screen. And finally, set the Duration for how long it'll take to get there (probably 1 second will be enough). :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
Can help again?
And only for explain more about my game, I have an actor, that controls the camera, can do the popup using this method too? Or have another method when an actor controls the camera?
Because, when actor complete the level, need an popup to player choose next level or menu. But, need to appear next actor, because him control the camera.
Sorry if confused
But now, I want the popup come in the screen where actor is.
How can I do this?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Do you guys think this is ok or is it too much memory consuming?
Cheers