Tap Question

Alright, I have a problem:

Actor 1:
-When touch is pressed, change attribute wrong to true
-When game.wrong is true, reset scene

Actor 2:
-When touch is pressed, change image

Actor 2 is on top, or in front, of Actor 1. However, when I touch Actor 2, it should change image, but it doesn't. The scene resets. Anyone know how to make it not do this?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If your actors overlap, you'll need a rule in actor 1 that says When actor collides with [actor 2]
    ...and then in the Otherwise section place the two rules you listed above.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    @tatiang I tried and for some reason, it's still not working :(
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Try this demo and let me know if it works and if you have any questions about it. When you preview it, click on the white actor (nothing should happen). Then drag the red actor away and click on the white actor (it should change scene).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    @tatiang thanks for the demo! However, for some reason, I can't download it? I'm clicking the zip, but it's just an image?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Give me a minute and I'll give you a Dropbox link.

    It's a Mac Creator file. Are you using Mac or Windows Creator?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
  • tglessytglessy Member Posts: 41
    Thanks! I took a look at it. My actors don't move though :/ How would I go about doing it?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The only reason I made the red actor moveable was so that you could see the effect of having the actors NOT collide.

    Okay, I think I understand what the issue is. You want your reset actor (actor 1) to only reset if the player taps/clicks on the part of actor 1 that is not overlapping with actor 2... is that correct? If so, you really need to make a "mask" actor that is invisible (self.color.alpha=0) but that handles the scene reset and is not overlapping with actor 2.

    If I'm still not getting it, perhaps you can explain a bit better about why you have overlapping actors.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    edited February 2013
    @tatiang

    http://i.imgur.com/aJnr1NM.png
    http://i.imgur.com/1CMTp6Z.png

    Exactly! How would I go about making this "mask"?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I guess my question would be why does actor 1 have to change the scene? Why not have a "verify" button elsewhere on the scene that allows the player to see if they have the correct numbers entered?

    The problem by the way -- which you've probably realized by now -- is that layers in GameSalad do not prevent touch recognition. So just because something is in front of something else, it doesn't mean it blocks touch rules on the actor behind.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    Well, when touch is pressed, change attribute wrong to true is really the only attribute in Actor 1. When game.wrong is true, reset scene is in another actor that's invisible and handles several other stuff as well. And the game is about touching the correct squares in order. If you make a mistake, the level starts over
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    Sounds a lot like Light the Way (https://forums.gamesalad.com/discussion/42745/light-the-way; https://itunes.apple.com/us/app/light-the-way-full/id526208947?mt=8).

    If the player makes a mistake, does Actor 2 need to change its image even though the scene is going to be reset immediately?

    If you'd like, you can send me a link to download your project file (please .zip it first) and I can take a look. Sometimes these forum exchanges are efficient but other times it's a lot quicker to see the code.

    I may need to resume this in the morning, but I'm happy to help!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    That's because it is! I'm @poorcollegedev , just A new account! I'm updating it, but doing things a little different now. Basically, I'm trying to make it easier/ faster to make the levels. But yeah, I'll send you what I got in the morning. We need our sleep :D
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    lololol oh boy, how funny! When I saw that sketch I thought ... wait a minute ...

    So yeah, PM me a link later and I'm sure I'll see what you mean.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tglessytglessy Member Posts: 41
    PM sent!
Sign In or Register to comment.