Interpolating Game Menus

Macca_McGillMacca_McGill Member, PRO Posts: 108
edited November -1 in Working with GS (Mac)
Hi again guys,

Im trying to use the interpolate to create sliding game menus. As i have each of the buttons as actors, on the main menu there is 'new game' 'instructions' and 'options'. When you select any option i want them to slide off to the left then the next scene would slide in from the right. Ive got the text to slide off to the left ok, but i dont know how to bring in the next actor from the right. For example if u select instructions, it will get rid of the main menu text and bring in the instructions text box, and a back button, both of which are actors.

Any help is gratefully appreciated.

Thanks.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    You'll need to have it trigger an attribute. i.e.

    Create a boolean attribute name it something like 'show instructions'

    So, when you have the text slide off to the left, upon its destination or as it starts to move, have it change the boolean we just created to true.

    Then in the actual instructions to slide in from the right, have a rule that says - When game.show instructions is true, interpolate to ..... Then use the otherwise section of the rule and have it just simply interpolate back out tot he right.

    Then to reverse it, just switch it round, on the back button it would set it to false, this would then trigger the otherwise rule from above as the boolean is no longer true and would interpolate back out right.

    You then need rules in your original actors that say when the boolean is false, the original actors interpolate back into place

    Hope that helps.

    Cheers
  • Macca_McGillMacca_McGill Member, PRO Posts: 108
    where am i creating the boolean attribute? on the scene or inside the instructions actor?
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    If only 1 actor needs to reference it then it can be on the actor. In this case, you need multiple actors so will need to make a GAME attribute.

    Left side of creator > Under Game > Attributes ... Create here.

    I suggest you watch all the videos in the Cookbook channel, you will pick up so much from here;

    http://www.youtube.com/user/GameSaladCookbook
  • Macca_McGillMacca_McGill Member, PRO Posts: 108
    thanks, i figured it out anyway haha :)
Sign In or Register to comment.