jmg89's Recent Forum Activity

  • jmg89

    Here you go:

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

    I used one sprite with different frames. You can use a family with multiple sprites if you want.

    dop2000

    Thank you. But this doesn't work if we use family.

    1. In family correct drop is working fine but the incorrect drop is not.

    Object 1 works correctly i.e. comes back to its place if placed incorrectly but when object 2 is placed incorrectly then object 1 tweens to object 2's position automatically!!!

    Also, set "drag-drop" to "disabled" after correct placement is not working.

    2. The IncorrectDropCounter does not work as expected. It shows the text even if Obj 1 is placed incorrectly twice and obj2 is placed incorrectly once. I think it is counting all objects incorrect placement combined and not individually.

    I sincerely thank you for all your help, you are a great person.

  • Hi, thanks for the reply.

    [quote:l4zhz8c9]I'm not sure how your game works and where do you get values for TargetX, TargetY.

    I have 2 objects for each set of events 1. The draggable and 2. The drop area (which is a duplicate of the draggable with opacity set to 0).

    So, like this, I have around 13 dragables and 13 drop areas.

    I set the XY position by seeing the XY position of the drop area object.

    i.e. if the object is dragged and it overlaps the drop area then it snaps to the XY position of the drop area, if not, then goes back to its original point.

    [quote:l4zhz8c9]If you have to repeat the same event more than twice, you should definitely optimize it.

    Add all sprites to a family, define Drag&Drop behaviour on the family. You'll be able to keep just one event "Family on Drop" and remove all duplicates!

    Add instance variables to the family: StartX, StartY, TargetX, TargetY

    On Start of the Layout (or On Family Created) set StartX to Family.x, set StartY to Family.y

    [quote:l4zhz8c9]On Drop - if dropped on a wrong spot, set object position to (self.StartX, self.StartY)

    If dropped correctly, set object position to (self.TargetX, self.TargetY)

    Sorry, I didn't get these. I humbly request a screenshot or .capx.

    Thanks again.

  • Hi,

    I have made a game with 41 events with help of a template. It is drag and drop, shape matching game.

    I am using "Lite Tween" behaviour which uses XY position to drop objects at the correct place and return to the original place if dropped at the incorrect place.

    I wish to change the layout of my scene, like moving the draggable to another position or the drop target to a new place.

    This messes up the game as all the XY positions in events are already set.

    Will I have to change all of them again every time I change the layout or is there a way to do it automatically without manually changing XY of all my events?

    Thanks.

  • Hey...I did it ... Thank you so much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. But I am totally a newbie and have created this project using a template. Can you please provide a screenshot of how to do it? Also, I am not into coding

  • Hi, I have an event where an object is dragged and dropped at a particular place.

    If the drop place is correct then the object stays there but when the place is wrong then it returns to original position.

    Now, how can a display a text when the "else" condition is triggered 3 times in a row i.e. when the object is dropped at incorrect position 3 times consecutively, then a text must appear on the screen.

    This is my event sheet:

    Thanks.

jmg89's avatar

jmg89

Member since 1 Apr, 2018

None one is following jmg89 yet!

Trophy Case

  • 6-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies