Laurent's Forum Posts

  • Thank you !

    I found this tutorial that allows unique value and shuffling in only one line !

    https://www.construct.net/en/tutorials/shuffle-array-boss-easy-event-2396

    I'll consider your suggestion for filtering and adding value at the end of the array.

  • Hello,

    I have an array with only dimension X.

    I want to populate each of its 50 cells with a unique number from 1 to 50. I also want number 25 to falls after cell #20.

    How can I do that ?

    Tagged:

  • Thank you, I managed to have it work :)

  • You're right, that was the point.

    Any idea how to slow down the animation then ?

  • Modified it but still the same...

    Or maybe I did something wrong naming my imagepoints...

  • I have a sprite with 5 image points (named 1 to 5) and I want to create a text box that displays the number of the imagepoint at every image box.

    I've made this loop but it doesn't work. All it does is endlessy creating text boxes at image point 0.

    Any idea why ? It seems my syntax is ok

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, I managed to have it working, +90 had to be added somewhere : -4*anglediff(angle(AiguilleRadio.x,AiguilleRadio.Y,emetteur.x,emetteur.y)+90, AiguilleRadio.angle)

  • Wonderful ! Thank you very much.

    the first solution works very well but there seem to have a problem with the second where the comparison should maybe be made with angle between blue dot and red dot from the rotation center of the needle. What do you think ?

  • Hello,

    I'm trying to simulate a radio receiver.

    Here's how it works : the needle rotates around its axis. In the following image, theres a network broadcasting from the position where the red dot is (90°). When needle angle is 90°, volume is at its max (0 db). When needle moves away from 90° (ie to 85° or 95°, ie 90°±5°), volume decreases and reaches silence (-20) when 85° or 95° is reached.

    How can I do that ? I knwo angle math is involved but I have issues dealing with the "90°±5°" part.

    I even tried an approach using positionning sounds (using the blue dot as a receiver and red dot as a emitter) but it is not very flexible.

    Tagged:

  • Hello,

    The webmaster the site my game is hosted sent me a line to implement Google Analytics :

    <script async src="https://www.googletagmanager.com/gtag/js?id=XXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-68GVWJTW4D'); </script>

    Where shall I add it to my Construct project ?

    Tagged:

  • You do not have permission to view this post

  • OK, I managed to get it right on my side :

    - A, B, C are in Family.

    - Runtime operation state that B has to be created.

    - B is created using Create object by name.

    - Last created object from Family is picked (B, because B is in Family and B is the last created).

    - Picked Family member (ie B) is added to hierarchy.

  • Hi dop2000

    Thanks !

    I've slightly modified my question since you answered.

    I've tried your formula by checking templateName but it doesn't seem to work..

    Is it possible to pick a family membre before creating it ?

    Besides this family problem, what I need is :

    - create a given object from data taken from a JSON (actually an object used as a template)

    - add this object (template) as a child to another object.

    And it seems that :

    - I can create a object by name

    - I can't add an object by name to another object.

    Hence my attempt of a workaround using families

  • In my game, I've a sprite named "card" with hierarchy and need to add children runtime. The children will be taken from a Family named "External modules".

    I've tried a test with a sprite named "test". It works

    Point is that when I replace that sprite with family, a random family sprite is created. How can I choose the family member to display ? (actually, I'd like to show a template)

    Tagged:

  • This is a special request.

    I have a construct project that is basically an iframe that displays a website.

    Everything is fine except for display : iframe is not responsive and shows margins depending on the window size.

    How can I make it responsive so that iframe exactly matches window size ?