Find the Difference Game - Correct & wrong answer cause issues

HallJackedUp

  • Posts: 5
Newbie here! 8)
I am trying to create a game where you search for differences in two images that seemingly look the same.

What I would like to happen:
- Player clicks on part of the image that is different from the other image and a circle appears around that image as well as music plays, victory counter increases, and eventually the player can move onto the next level once x amount of correct differences are found

What actually happens:
- Player clicks on part of the image that is different and it is counted as a wrong answer and a correct answer
- Can't figure out how to get circle/oval to appear around correct image once it has been clicked

Problem I have found no solution to:
- The ENTIRE picture to be clicked to find the difference within is set as an actor (could be an issue?)
- I have put invisible blocks around all of the 'correct' answers. However, I cannot figure out how to make the invisible box be dominant over the entire image so as it won't count as a correct and wrong answer

I hope this makes sense. I have searched for a week for an answer and haven't found anything that I can actually get to work. Please feel free to point me in that direction if someone else has posted this before. Thank you!

**See attached images
**In scene events 1 I removed the coding that was causing the issues for wrong and right answers and in scene events 2 I added it back so you could see what was happening

« Last Edit: April 15, 2018, 11:11:14 am by HallJackedUp »

xRANDBOx

  • *
  • Posts: 76
you could try checking coord of mouse pressed. something like

if mouse was pressed
   if x of mouse is >= x and <=x & y  of mouse is >= y and <=y
      do event
         create circle actor at x center & y center
otherwise
   do event
        play error sound

hopefully this makes sense

Chum

  • Posts: 3
Hi, I have possibly found another solution to your problem.
I think making regions on scene would be easier than creating invisible blocks, because regions can be as wide and as high as you want and they are dominant (what you mentioned you wanted to fix) (btw. using them will make your game few MBs smaller) and just do "when the mouse was pressed on region" then choose your regions. Make cross and circle actors which should appear when you click. E.g. "When the mouse is pressed on region 1 create "circle" at: (chosen x position; chosen y position)" ; and "when the mouse is pressed create "cross" (make it disappear is a few sec) at: (x of mouse, y of mouse). It should help in everything except not showing crosses on the right places. I think for it you can do: "when actor enters region; kill self (and copy the event for other regions). If you don t know how to create regions go to your scene and press the "blue box" button.
Hope It helps. If you want any further help I can probably send you coding example but it will take a few days.
P.S. i didn t mention that you will have to make many "circle" actors to be the exact size to fit around the differences.

HallJackedUp

  • Posts: 5
Hi, I have possibly found another solution to your problem.
I think making regions on scene would be easier than creating invisible blocks, because regions can be as wide and as high as you want and they are dominant (what you mentioned you wanted to fix) (btw. using them will make your game few MBs smaller) and just do "when the mouse was pressed on region" then choose your regions. Make cross and circle actors which should appear when you click. E.g. "When the mouse is pressed on region 1 create "circle" at: (chosen x position; chosen y position)" ; and "when the mouse is pressed create "cross" (make it disappear is a few sec) at: (x of mouse, y of mouse). It should help in everything except not showing crosses on the right places. I think for it you can do: "when actor enters region; kill self (and copy the event for other regions). If you don t know how to create regions go to your scene and press the "blue box" button.
Hope It helps. If you want any further help I can probably send you coding example but it will take a few days.
P.S. i didn t mention that you will have to make many "circle" actors to be the exact size to fit around the differences.

Hi there!

Okay, I went with your solution and the regions came out perfectly! Thank you for that. I am still having issues with the areas around the regions. Now the health meter goes crazy and starts counting down insanely fast for no reason... so frustrating. I also have no clue how to create the circles around the answer even though you gave me directions. To create the circles would that be under drawing or when updating? Still learning the difference between all of these events.

Thanks for the help so far!

I have also attached a screenshot of my updated code

SceneEvents_1_Attempted.png

Chum

  • Posts: 3
You can create circles two ways, as you said, drawing or updating.
I prefer the second way because I am not pretty sure about drawing those.
Updating is easier. You have to create new actors (circles),  every one of them has to be the exact size to fit around one of those differences, so it means you have to create few actor types.  For creating actors on scenes, search for dark pink block "create actor at: (x, y) [there are two types of this block, choose the one that creates actor at front. It will spawn the actor on top of the others]
Try this, if it does not help I ll try to find out the other way