rk123's Recent Forum Activity

  • Aha that's interesting. I am dragging/dropping the tile itself, so isn't it exactly the same then when you touch the instance itself. Am I missing a logical technical detail here? If so, then how should the picking be notated?

    Thank you in advance

  • Thanks for the reply. Well they should be, because I amstoring the x,y values of touch start/end in these global varables.

  • No idea really...

    I forgot to mention that the variables rl1x and rl1y are the staring coordinates of the touch (I also tried the end coordinates of the touch)

  • Dear all,

    I have a family called Tiles with different objects and their instances. I am struggling a lot with being able to figure out which condition I need and the corresponding expression (how, what to fill in) to be able to pick only the instance of an object inside a family that is being dragged/dropped.

    If I do the following, of course all instances in the family move along:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a sprite family consisting of 10 different sprites that I duplicate 4 times each in a certain layout.

    The purpose is that if one of those instances moves, the corresponding one moves on the multiplay.

    I can do it now making 40 different sprites in stead of 10 duplicated 4 times, but it takes a lot of time and will be too much added code...

    How can I save the time and unnecessary extra lines?

    Thanks in advance

  • I managed it!

    Just inverting the animation matching and if so, then return the box to original position.

    Thank you so much!!

    So the very last thing I'm struggling with is:

    Imagine the boxes are touching from the beginning of the layout. Then if a box is placed so that there are 2 separate groups, then the box reverts to the past position. How to detect those 2 "groups"...

  • If you need to set lettersMatch variable per each box, then you need an instance variable.

    Indeed, so each time a box is dropped it checks if there is a match and if so, the lettersMatch instance variable becomes 1. If not, it will become/stay 0. However, I can't seem to get this to work.

    Also, after there has been a match and a new box is picked up, the lettersMatch instance variable needs to be 0 again.

    You can add a pair of instance variables startX and startY to the box, set them to box.x and box.y on start of the layout. When the box is dropped and there is no match, return its position to box.startX, box.startY

    Yes! Thank you, this one I managed hehe, but thank you anyways :)

  • Wow, thank you so much Dop2000!

    It works very well. Finally my desperation ended thanks to you. Thanks!

    Yes, so talking about if letters match at overlap: what I would like at the end is that if there is no match (lettersMatch=0), the square returns to its original place. If lettersMatch=1 then the placement in the new location is ok. This assessment needs to be done each time a square is dropped.

    I have managed to do the logic on returning to original location and testing it with another kind of check and its variable, but now what I find is:

    - the placement to original place doesn't work with the lettersMatch=0 variable

    - whenever there has been a match the variable stays on 1. I have tried both global variable and object variable for lettersMatch.

    Do you have any idea about this perhaps? Sorry to bother you again. We have come so far, closing the case by reaching the functionality goal would be super!

    Thanks!

  • I'm also trying to get the actions based on the variable "letterMatch" to work, but it doesn't.

    What I'd like to do is that after each drop, the assessment: if the letters match or not, will influences the variable.

    So on drop: if "letterMatch" = 1 -> do action. If "letterMatch" = 0 -> don't do action.

  • Another option is to pin sprites with letters to each side of the square and compare overlapping letters.

    Thank you very much for this example!

    What I'm struggling with right now is how to place specific letters on to specific places (so not randomised image frames). I tried it using image point names, but in setting the animation frame I can not refer to an image point's name. Do you perhaps know how I can have the "detection" letters (frames) match the static letters on the squares (pre determined)? Someone in the forum once mentioned this need before too: "It would be useful to be able to get sprite1.imagepointname(loopindex) the same way we can get the sprite1.imagepointx(loopindex) as it would save keeping another array in sync with the image points." He/she mentions solving this using an array. However, I have no idea how to do that either....

    I'm also trying to detect whenever a group of squares becomes separated (so when 2 or more groups with connected squares exist). Really not a single clue how to approach this one....

  • Dear all,

    I have multiple square sprites, and on each side of each square there is a different letter (or it could also be that there is just one type of letter for all four sides, or a combination). There are 4 letters in total.

    I would like the player to be able to drag and drop a square next to other squares, and if at least one of the sides of the newly placed square has a matching letter with its surrounding squares, it can be placed (variable: "matching" = 1). If there is no match at all, then not (variable: "matching" = 0).

    I have been struggling for a month trying to achieve this with collision checks using instances, families, UID picking, containers etc. I've read probably all topics regarding this kind of question. However, I am about to become desperate about this matter because until now I have had no results.

    Before I share some ideas of a beginning solution, I will give your creativity the freedom to suggest something potential.

    Hoping for some suggestions from you!

    Kind regards

rk123's avatar

rk123

Member since 6 Apr, 2019

None one is following rk123 yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies