Laurent's Recent Forum Activity

  • My game is an empty scene when layout starts.

    All my objects to be displayed are in a family and they re a lot.

    At start of layout, how do I tell Construct to look into Family and create each object at the centre of the layout(x=layoutWidth/2, y=layoutheight/2) ?

    Tagged:

  • Thank you !

    Construct is full of subtilities :)

  • Amazing !

    thanks for confirming this intuition :)

    (the subfolder trick doesn't work, though)

  • In my project, I use Ajax request a lot, but according to player choice, the requested project file is always different.

    In the following expression, how can I use a variable instead of testFr.srt filename ? For example, filename could be testFr1.srt or testFr2.srt...

    -> AJAX: Request testFr.srt (tag "subFr")

    Can I use Request URL instead ? And if yes, what would be the adress to a project file named testFr.srt

    Tagged:

  • What would be the best screen size to develop a webapp with if I want to fit most of the phones on the market with ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Quite right.

    This works :)

    Now, when scaling one family element, disable touch to other elements

  • I added a drag function to the Family but there seem to have conflict between drag touch and touch used for rescale. Any idea on how to fix this ?

  • OK, I managed to have it work with elements and adapt it to my project. Thats wonderful ! Thank you very much.

    Here is the file if it can be useful to anyone.

    dropbox.com/s/tsu1unckxdinog2/Zoom%20an%20element.c3p

  • I have this old demo:

    https://howtoconstructdemos.com/zoom-a-sprite-or-entire-screen-with-pinch-touch-gesture/

    I believe I've also seen an official example for zooming with pinch.

    Thank you ! that's interesting indeed !! I see your example relies a lot on UID but I need to be able to apply this to the elements of a family and families don't have UID. Is there a workaround ?

  • My game for a multitouch board has different elements on the screen acting like documents on a desk. I'm looking for a way to scale the object by pinching them with two fingers.

    I've the intuition I have 1) to record two touch points when object is touched, 2) record their distance when both touches occur and 3)monitor their distance change when they are in touch and send this relative change to the object.

    OK but how do I program this ?

    Tagged:

  • Create two instance variable for the object and set them while dragging: prevX and prevY. Set up an event to check before you update the variables.

    So something like:

    Object Is dragging

    1) if object.prevX < object.X then you know the object has moved to the right, etc.

    2) set object.prevX to object.X

    You have to do the comparison before you update the variables, otherwise prevX and X will be the same.

    Woaw, thank you :)

  • In my game, an object has the DragNDrop behaviour. To adapt how other sprites around behave, I need to know the direction the drag is going.

    How can I do that ?

    Tagged:

Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies