RBuster's Forum Posts

  • I need to check if two sprites are at the same angle before snap them. "Compare angles" doesn't exist so I tried to use "compare two values" to compare angles but it didn't work. Any other possibility?

  • Hey guys. I still need a little help of my pals.

    https://www.dropbox.com/s/u7hcn97o2hmi2 ... .capx?dl=0

    I would like to know how to check if the player used a two triangles (with different angles) or a square to occupy a square mark. I need to know too how to snap the sprite on the mark independently the shape (square or triangle) and the angle.

    Thanks in advance

    *** A CAPX is not necessary. I just need to understand the logic.

  • in some cases it is better to keep quiet, especially when we have nothing to add. If we do not know how to help someone, it is best to let others do it.

  • I'd be more than willing to help, if helping didn't mean creating it for you..

    I gave a very badly made example and all you did was add one event that didn't work as expected..

    I was hoping to see your code and give some advice as to how to get closer to your objective..

    So what you'd like to do is when sprite is overlapping another sprite, check if the sprite would fit.

    All you would have to do is create conditions on drag and drop drop, to check these..

    A rotated triangle won't fit inside a non-rotated square, etcetera..

    I don't ask for a project or example either. You did it because you wanted, and I just prepared the other example because you didn't understood what I'm looking for.

  • Please, guys. I still need a little help with this subject.

  • ok.. A few questions..

    Why is there a sprite3, sprite4 and sprite5, when they are exactly the same object as sprite?

    Why not use instances?

    Why is there a drag and drop behaviour on both the sprites and the family all the sprites are in?

    Okay. No problem to use instances and sorry about the behavior duplication. I tried to create a new project quickly.

  • So I guess you allready got this far?

    https://dl.dropboxusercontent.com/u/485 ... tance.capx

    Very dirty method to get the first part working, by the way..

    Yes. No problem with this.

    I used your example to create another one that represents what I need to understand.

    https://www.dropbox.com/s/u7hcn97o2hmi2 ... .capx?dl=0

    I have to fit all the pieces in the figure using all possible combinations (use the spacebar to rotate the pieces).

    I really appreciate your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay. But I don't know how to prevent all possibilities (the same figure can build in all orientations) and how can I associate a shape (as I said, I intend to use duplicates to check the sprite) with two others.

  • Some help, please.

  • So, I intend to use duplicates of the tangram pieces to mark the right place but I don't know if this is the better solution (I believe not). I thought to use variables too, but the problem for me is to prevent all possibilities. You can build the same figure with several different combinations. For example: one big triangle or two small - one square or two small triangles (inverted too) - a rhombus or two small triangles, etc.

  • I intend to create a game like tangram. I thought to use duplicated sprites as marks (placeholders) but I don't know how to prevent a different combination of sprites that will be correct too. I need some suggestions. Thanks in advance.

  • korbaach

    The new solution is very nice! Many thanks.

  • I don't know what I'm doing wrong. I just create new spriteCorners with turn variable defined like 2

    https://www.dropbox.com/s/1klwdcx8idcls ... .capx?dl=0

  • Actually, was a guess, but when I test this theory in the capx you sent, the spriteCar right past the second spriteCorner set to turn "2" and nothing happened. Maybe my mistake.

  • Thanks

    But I believe that we have a problem: if I use 2 spriteCorners to turn left, the coordinate will change, although it still with the same "turn" value

    Is there a way of spriteCar use the same image point position of the spriteCorner that it collided?