Help with "overlaps or collides" condition
whompy
Member Posts: 27
I just finished tshirtbooth's boggle tutorial. It's awesome. But I don't want to make a boggle game, I want to make a different word game.
And one thing I want to to happen is instead of clicking on letters to select them, I want an actor to move around the scene and touch the letters. They'll be selected that way.
So I replaced the "when touch is pressed" action with "actor receives event overlaps or collides with actor of type (name of actor)"
My boggle game works fine with the "when touch is pressed" action. The ONLY thing I changed was replacing that with the overlap action. But when I move my actor over a letter, it only selects one letter. When I move to any other letter, nothing happens. Why can't I select more than one letter? Any ideas? Is there something about the overlap/collide action I need to know?
Thanks for your help!
And one thing I want to to happen is instead of clicking on letters to select them, I want an actor to move around the scene and touch the letters. They'll be selected that way.
So I replaced the "when touch is pressed" action with "actor receives event overlaps or collides with actor of type (name of actor)"
My boggle game works fine with the "when touch is pressed" action. The ONLY thing I changed was replacing that with the overlap action. But when I move my actor over a letter, it only selects one letter. When I move to any other letter, nothing happens. Why can't I select more than one letter? Any ideas? Is there something about the overlap/collide action I need to know?
Thanks for your help!
Answers
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
And so far, my actor will select the first letter of a word when it collides with it, but it won't select anymore letters.
try to space them out let the actor goes out of the previous (image /letter) before it collides with the next one, does that make any difference?
Inside letter actor.
Rule
ALL
When actor overlaps/collides with selector AND When enter key is down
Put you action for letter.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Ah, yes of course, I bet that's what it is. My letter actors are very close together, and so the actor moving over them does indeed overlap at least two at a time, thanks, that was driving me nuts.
I think this will solve it though- won't it work if I have the actor move the length or width of the letters at a time? So in other words, instead of the actor moving gradually to the right or left, I have it "jump" 50 pixels or so (the width) of the letters) so that it always only touches one letter at a time. I think that will work.
Thanks for your help!
don't forget to use constraint attributes to let the (collide actor) matches the X,Y of the main actor (which is letter A in this example)
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS