Braus's Recent Forum Activity

  • Hi Bruno. Always saving me.

    Very nice solution. I will implement it.

    Many thanks.

  • I found a nice tutorial about a slide puzzle :

    The problem is that I don't know how to check if the player build the puzzle correctly to give you a award. Could someone please help me to figure out how to reward the winner? <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • Thanks Bruno. I had tried the "every X second" before but not in this way.

  • I am using this code to do this:

    • For each myInstance

    -- Pick a random myInstance

    -- myInstance is active >> wait 1 second

    -------------------------------->> myInstance set opacity to 0

    -------------------------------->> myInstance set active to true

    I believe it's easy, but not for me

  • Use the trick with families.

    Create a family with just this one object. Then you will be able to refer two different instances of this object in one event. Like this:

    dop2000

    I saw that you use a distance of 100 pixels for each one but in my case I will work with more than 2 instances. So I intend to register its positions in two local variables (positionX, positionY) and use them to define the place of each instance that I am changing.

    Thanks, this solution worked very well.

  • I am using the drag and drop behavior and when the instanced is dropped in another one I want that instances change its position but I don't know how to implement it. Could anyone help me with this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found the answer in this thread:

  • If so, could you please tell me how can I do to get this format: x.xxxxxxxxxxxx and convert to: x.xxx?

  • I am using wallclock to get the interval between of the start of a event and the mouse click. So I store it, reset the time and start the wallclock again. I wonder if the format of this interval is in milliseconds or not and if not, how can I format it in milliseconds.

  • It worked very well. Thank you. 99Instances2Go!

  • set their positions, but these tries don't work

    That is probably because you use 'world' coordinates. While you need 'relative' coordinates.

    So first you find the X/Y pixels the dragged one moved compared to last tick.

    Say dragged one's name = drag

    2 instance variables. dx and dy. Their expressions are drag.dx and drag.dy.

    2 instance variables. prex and prey. Their expressions are drag.prex and drag.prey.

    Every tick

    ______ set (drag) dx to drag.x - drag.prex <---------- calculate difference

    ______ set (drag) dy to drag.y - drag.prey

    ______ set (drag) prex to drag.x <---------- update to use for the next tick

    ______ set (drag) prey to drag.y

    Now, dx and dy hold the distance drag moved compared to the previous tick.

    So ..

    On dragging

    _____ set any object's position to x= object.x + drag.dx ... y= object.y + drag.y

    Thanks 99Instances2Go

    Sorry, but this is a little confusing for me.

    I have a main Sprite (that I think you named as "drag") with the drag 'n drop behavior so I need to create these 4 variables in this sprite and in the event "on dragging" I will associate all the other objects (or a family) that I need that follow the main sprite. Is it right?

  • I am using the drag and drop behavior in a sprite and I would like to move 3 other sprites at the same time when I drag it. I tried to pin them to the main sprite and also the "every tick" condition to set their positions, but these tries don't work. Is it possible?

Braus's avatar

Braus

Member since 17 Jul, 2015

None one is following Braus yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies