angle checking nightmare

0 favourites
  • 5 posts
  • Hi All,

    I am trying to create a shape matching game. I am having trouble checking to see if the selected shapes match the holes they correspond with. I seem to be able to check if the shapes are the same but I am having difficulty checking whether the angles of the holes and shapes are the same. I initially used the �within x degrees� expression but it didn't work. I�m now using the �anglediff� expression to make a comparison. Unfortunately I haven�t had much luck getting this to work either.

    I would really appreciate any help anyone can give me. I have been trying to fix this for a while now and I don�t know where I am going wrong.

    dl.dropbox.com/u/101200636/Shapematch-updated-v2.capx

  • Unfortunately, your capx is a bit complex for someone to look at and quickly find the solution. If you could create a new project which includes just this one issue, we'd be able to assist much more effectively.

  • Hi sqiddster

    Thanks for your reply. I had already slimmed the capx down before posting it on the forum. I tried to leave anything in that I thought was essential in order for the game to work properly because I wanted to make sure anyone viewing it would understand it properly.

    At the start of the game 2 target shapes (holes) are put onto the screen at random angles. The player must then chose the correct shapes to put on the screen and rotate them to the correct angles.

    The particular section I'm having trouble with is the group called 'Correct'. In this group I check the shapes to make sure they match the holes on the screen (I do this by checking the frames in the animations). I also check the shape to match the height of the target shapes they are going in.

    Both of these checks seem to be working, the problems start when I try to check to shapes angles.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The problem may lie in the fact that some of the shapes are symmetrical - i.e. there is more than one angle it can be at where it can actually fit in the hole.

  • sqiddster, thanks for your suggestion. I don't think this is the problem though, as the angle check still does not work, even when I only use non symmetrical shapes. I'll keep trying other things and hope I come across the solution, thanks anyway.

    unplugged <img src="smileys/smiley1.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)