Help on creating a rule. stuck.

VolontaArtsVolontaArts Member Posts: 510
edited July 2013 in Working with GS (Mac)
So i followed this great tutorial on making a slide in menu. But i used it for my character select screen. so not when i tap to select another character the previous character that slid in doesnt back out.
im trying to thing of a way to make it back out but im new to rules.

More detailed explanation.

so i have 5 buttons for characters on the right. i want them to slide in from off the screen, into the screen on the left. with the tutorial i achieved this. but they are not backing out when another character is selected lol. So if anyone can help with a rule it would be greatly appreciated.

Comments

  • VolontaArtsVolontaArts Member Posts: 510
    bump. i know everyones busy with there own games lol. but will appreciate the help
  • TivitraTivitra Member Posts: 32
    Could you add a link to the tutorial so I can see what you have done on the previous steps?
  • VolontaArtsVolontaArts Member Posts: 510
    @icebeargames sorry i thought i did


  • VolontaArtsVolontaArts Member Posts: 510
    he basically makes a attribute that when you touch it it moves a actor from x to another x position
  • VolontaArtsVolontaArts Member Posts: 510
    anyone
  • VolontaArtsVolontaArts Member Posts: 510
    .....
  • natzuurnatzuur Member Posts: 304
    Not sure what rule sets your using, I would just create a index attribute (we'll call it characterID) and use the mod function to cycle the numbers. So each char has its own Id (1,2,3,etc).

    Then each time a slide triggers use this: change attri characterID to (characterID+1)%X with X being the number you wish to be the max number of characters in rotation.

    Now put logic in each character to slide away when it's ID is not there own. And to slide in when it is. For the slide i'd suggest interpolate.
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur thats kind of what i have.

    i have on the button to select which character you want a attribute with (slidecharacter+1)%2 so ill change the 2. then the characters have when attribute =1 interpolate... so how can i write them to slide away when the id is not theirs.
  • natzuurnatzuur Member Posts: 304
    When attribute ≠ (does not equal) id interpolate away.
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur a seperate rule huh?
  • natzuurnatzuur Member Posts: 304
    I would do it that way yes. You could also probably get away with it in the otherwise statement as well.
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur cool. thanks a lot bud
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur for this to work they need to all be under one attribute? lol because i made one for each character before and starting to think thats not how ur method works.
  • natzuurnatzuur Member Posts: 304
    In this case, yes it would be one attribute for all. But you could do it with one each in a pretty similar manner, more logic would be needed however.
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur thanks again. i have no problem changing them back to one. not that difficult.
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur how do i say (slidecharacter+1)%2 instead of the +1 say =1? because i dont want it to be random. each character has there own selection box like when u select a character at a arcade game like street fighter. this plus one works for a scrolling through chracters type of selection.
  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    edited August 2013
    Deleted

    Follow us: Twitter - Website

  • natzuurnatzuur Member Posts: 304
    Here is a demo I made for you of an arcade style selection http://www.mediafire.com/?pqozzrf1yb1lo8j
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur i really appreaciate the attempt. but for some reason my mac wont load the download.
  • VolontaArtsVolontaArts Member Posts: 510
    hey everyone....2 days and still stuck if anyone has any ideas other then natzuur would be appreciated thanks!!
  • VolontaArtsVolontaArts Member Posts: 510
    bump adding images
  • VolontaArtsVolontaArts Member Posts: 510
    edited August 2013
    photo ScreenShot2013-08-02at30209PM.png

    ok so this is what i want to slide over which is what it is doing.
  • VolontaArtsVolontaArts Member Posts: 510
    edited August 2013
    photo ScreenShot2013-08-02at30027PM.png


    an this is what triggers it. now i want to be able to make 4 of these. and 4 different slides. now if i touch a different slide, how do i make the others slide back in.

    basically tap one, actor slides out. now if i tap another, the other actor slide out on top of the other one. i want the previous actor to slid back in.

  • VolontaArtsVolontaArts Member Posts: 510
    ?
  • VolontaArtsVolontaArts Member Posts: 510
    @natzuur omg you are the best! lol finally my computer let me download it and it works amazing!!! i can finally get to my next step! thank you so much
Sign In or Register to comment.