unplugged's Recent Forum Activity

  • Hi vtrix

    Thanks so much for getting back to me, and thanks for the capx. Unfortunately my angles are set to 90 degree increments (0, 90, 180, 270).

    In my game both sprites and the angles they're set to are chosen at random.

    This is more or less what I want. The problem I'm having is occasionally the 2 sprites spawned are the same sprites at the same angle.

    Is there a way I can check to see if sprite 1 and sprite 2 are the same, and if they are, then set them both to different angles.

    I hope that makes sense, if not let me know.

    Thanks.

  • Hello,

    Is anyone able to help me. I have a family of sprites and I want to spawn 2 of them at random and position them at random angles (from an array of angles). I need to make sure that the 2 sprites are not the same sprite at the same angle. They can be the same sprite at different angles or different sprites at the same angle. I have no idea how to write this so any help to point me in the right direction would be great.

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I have a group of sprites I've put into a family. I currently spawn these sprites at random by using the family reference, which is more or less what I want to do. The thing is, I'd like to spawn two sprites at once, whilst avoiding any repeats. Can anyone advise me, is there a way to randomly spawn 2 object from a family, whilst making sure object 2 is not a repeat of object 1?

    Thanks for reading this, and for any help you can offer.

  • 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" />

  • 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.

  • 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

  • Hi Nimtrix

    Thanks for your help. I tried the anglediff expression making it equal to or less than 0.5 and it worked. I'm so pleased as I have been trying to fix this for a while.

    By the way, do you know why the 'within 0.5 degrees' condition didn't work. I would be useful to know so I can learn from it. It seem to make sense logically and therefore made it hard for me to see why it didn't work.

    unplugged

  • Hi Nimtrix

    Thanks for your suggestion but my shapes don�t freely rotate, they only turn at 90 degree angles. So I don�t know why the way I wrote it doesn't work.

    <img src="https://dl.dropbox.com/u/101200636/shapematch-screenshot.jpg" border="0" />

  • Hi All,

    I was wondering if anyone can help me. I am trying to develop a shape matching puzzle game. I want to match my shapes by shape, height, width and angle. The problem I am having is matching the angle. For some reason this isn't working. If you look at my capx, you will see I have created a group call �correct� which carries out all the checks. This event was initially working correctly, but since adding the angle check (last condition) the event no longer works. I have tried increasing the 'within degrees' tolerance to 10 but it still doesn't work. I don�t know a different way to write this condition, can anyone help.

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

    Thank you,

    unplugged

  • Hi justifun

    Thanks for your comment. Here is the text link to my capx:

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

    I have tried increasing the 'within degrees' tolerance to 10 but it still doesn't work.

  • Hi Guys,

    I was wondering if anyone can help me. I am trying to develop a shape matching puzzle game. I want to match my shapes by shape, height, width and angle. The problem I am having is matching the angle. For some reason this isn?t working. As you can see from the screenshot below I have created a group call ?correct? which carries out all the checks. This event was initially working correctly, but since adding the angle check (last condition) the event no longer works. I don?t know a different way to write this condition, can anyone help.

    <img src="https://dl.dropbox.com/u/101200636/shapematch-screenshot.jpg" border="0" />

    Thanks in advance for any advice you can provide.

    Unplugged

    P.S. I tried to post my capx file but received an error message stating my rep points are too low to post links. Is there any way around this? <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Hi keepee

    Thanks for your reply, and I would be really grateful for your help as I am really stuck.

    I am trying to create a shape matching game. I have 2 groups of matching shapes which I have placed in families. 2 shapes from the first group are selected at random and placed on the screen at random angles. The player then needs to select 2 shapes from the second groups to match these shapes and angles within a time limit.

    I need to work out a way to check that:

    1.     The player only selects 2 shapes

    2.     These shapes match the 2 shapes on the screen

    3.     They match the angles of the 2 shapes on the screen

    I�ve been working on this for some time. The solutions I have come up with so far have achieved some of the things I want but the events I�ve created seem rather over complicated to me and I think you were correct that there is probably a better way.

    Unfortunately, I am still very new to C2 and programming concepts, and it was the best solution I could find with my limited knowledge.

    P.S.

    I created the text boxes just to check if my variables where being assigned correctly as I thought these variables would help me reference each shape so I could run my checks. These are not part of the game.

    Thanks again for any help you can give me.

unplugged's avatar

unplugged

Member since 7 Jun, 2012

None one is following unplugged yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies