can I "tap" on an image and have it move to the back (z - debth)?

xyloFUNxyloFUN Member Posts: 1,593
edited November -1 in Working with GS (Mac)
Hi,
I am wondering if I can tap on an image and have it move bellow another image that occupies the same screen space?
It would be easy to cycle a few pictures this way?

help? :)

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You could have images set that have the image ontop and the other ones stacked below, and just change the images in a set order, but you cant switch layers during gameplay
  • xyloFUNxyloFUN Member Posts: 1,593
    John,
    That is exactly what I need to do!

    The thing is that I can't google a tut orost where someone has solved or done this.

    Imagine if there were say three cards (pictures) laying on top of each other and the only function they need to perform is that when the top one is tapped, it moves to the bottom of the stack!

    How would I do this? Can it be done?

    Thanks for you help :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    It would be something like this. Have a attribute say you call it top card, and set it to 1. Have a rule when touched is pressed change attribute top card +1. Then have another rule when attribute top card = 3 and touch is pressed change top card to 1.That will take care of cycle threw 1,2 and 3, and make it so after your at 3 and u press again you go back to one. Then HAve a rule top card=1 change image to card 1. Have another rule when top card= 2 change image card 2. And one last rule when top card=3 change image to card 3. That will simulate the cards going from the front then moving all the way to the back. Then if you wanted more cards you would change the rule when top card=3 and touch is pressed change attriute to 1. You would switch out the 3 for the max amount of cards you want. THen just have the image rules to follow. when top card = 4 change image to card 4 and so forth. Hope i helped!
  • xyloFUNxyloFUN Member Posts: 1,593
    Thank you so much, John, THAT is the final puzzle in my my little master piece!

    I owe you :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    xyloFUN said:
    Thank you so much, John, THAT is the final puzzle in my my little master piece!

    I owe you :)

    No problem, Anytime :)
  • xyloFUNxyloFUN Member Posts: 1,593
    you are still awake ... good thing :)

    John,
    my old brain can not get this right! LOL

    "when attribute top card = 3" and touch is pressed ....

    that's where I am not able to follow.

    which of the available attributes do I choose? I tried a few but none let me enter that? I must be doing this completely wrong.

    Sorry to bug you again ...
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You would choose game and select the attribute top card or whatever you name it. So the rule will be when attribute top card =3, then to the right of that rule youll see + and - . Hit the + and that will add a new rule right under it but in the same instance. Thats where you put when touch is pressed. And Make sure at the very top of the rule it says when all conditions are valid, not any. So only when your on the last card and you touch it, its bring you to the first one, instead of just adding 1 like the rule originally is for when touch is pressed.

    If you need anymore help let me know ill be up
  • xyloFUNxyloFUN Member Posts: 1,593
    John,
    let's look at this puppy this way ...

    say I have five cards (i have made the gfx images and added five actors and each actor has a unique name and a unique picture assigned to it.

    I then go into my scene > attributes and add an integer attribute, name is "topCard"? and set it to 1 ?

    i suppose i now need to go into each of the five cards and add a rule when touch is pr.
    change attribute "topCard" +1

    do i go into card#2 attributes and add rule when touch is pr. change attribute topCard +2? (i think i am very wrong here already)

    this is very complicated for me as I have never done anything like this. But still, it would be a great solution to my problem :)

    This is a lot to ask but if you fell like it, I'd really appreciate the help :)

    btw, after this is implemented, my app is done :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Ok ill guide you step by step :)

    Make 1 actor call it card deck or whatever. Import your 5 card images to gs and name them card 1, card 2 card 3, 4 ,5 to make it easier. Now go add your interger attribute call it top card and set it to 1. Go into the card deck actor, Make a rule when touch is pressed change attribute top card to top card +1. Now make a new rule below that and make it when attribute top card= 5 ,Now press the + sign to add another rule in that same one, and make it when touch is pressed, then drag a change attribute behavior and make it change attribute topcard to 1. Then make five more new rules under that. Have the first one when attribute game card =1 change image to card 1. Go the second new rule and make it when attribute top card= 2 change image to card 2. Do the same for 3,4, and 5.

    You should be good to go
  • xyloFUNxyloFUN Member Posts: 1,593
    John,
    i just want to confirm that your recipe worked beautifully!

    I am speechless! You helped me so much with my first game that it is fair to say that I would have ether given up or made something really lame and far from what I have now!

    Tomorrow, I will send it to Steve and ask him to stick it into the store! :)

    This project could have not come together as it did without your help and the help of others who also provided solutions for me!

    Thanks everyone! This has been a blast and my little trumpet has come a looooong way!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    xyloFUN said:
    John,
    i just want to confirm that your recipe worked beautifully!

    I am speechless! You helped me so much with my first game that it is fair to say that I would have ether given up or made something really lame and far from what I have now!

    Tomorrow, I will send it to Steve and ask him to stick it into the store! :)

    This project could have not come together as it did without your help and the help of others who also provided solutions for me!

    Thanks everyone! This has been a blast and my little trumpet has come a looooong way!

    Im glad it worked for you! And anytime i can help im more then happy to :) Good luck on sales, ill be first in line!
  • xyloFUNxyloFUN Member Posts: 1,593
    i just want to add that my wife wanted me to send this is last week with hardly any elegant features ....

    but now I am thinking of maybe adding a recording of the melody into ..... nah .... next time :)

    So now I better read up on what Apple exactly needs and then it is smooth sailing!

    If I would know how much sales I get, I'd purchase pro just so that I can have URLs embedded ....

    What would you do John?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Well i guess it really comes down to if you can afford the 500 or not. As much as i would love pro and would love to give to gs, i just cant afford it at the moment. Im 21, putting myself threw college and me and my fiance live together. So 500 is like half the rent , or a semsters of books
  • xyloFUNxyloFUN Member Posts: 1,593
    yes, you are right!

    But there is hope that all of this work we do, creating original content will pay off sooner .... or later.

    I hope that those who will help me market the software know what they are doing and hopefully we can support each other down the road. Perhaps I can give you a link once our web page is complete ... you deserve it!

    I will be back on here tomorrow because I am already working on my next app!

    But I have to admit that I am weary about that GS intro with is NOT suitable for end users who just play the games. They HAVE NO inner designer to feed ... me t thinks.

    I hope your game does really well and I will review and buy a copy for SURE!

    Thanks for all your help :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    xyloFUN said:
    yes, you are right!

    But there is hope that all of this work we do, creating original content will pay off sooner .... or later.

    I hope that those who will help me market the software know what they are doing and hopefully we can support each other down the road. Perhaps I can give you a link once our web page is complete ... you deserve it!

    I will be back on here tomorrow because I am already working on my next app!

    But I have to admit that I am weary about that GS intro with is NOT suitable for end users who just play the games. They HAVE NO inner designer to feed ... me t thinks.

    I hope your game does really well and I will review and buy a copy for SURE!

    Thanks for all your help :)

    Thanks!! And anytime, let me know if you run into any problems on your new project. Your making a whole series of instruments right? Because if you go pro and sales arent how you like you can always try making the whole series free with ads in it. Just a thought lol Its almost 5 am so itsBedtime finally haha talk to you tomorow!
Sign In or Register to comment.