AllanR's Forum Posts

  • I have had issues with Apple doing Instance IDs differently in the past, so I switch the project to use UIDs instead of IID.

    now it works on my iPhone and iPad... it blew up with the old version on mine too.

    My phone uses about 40% cpu, my iPad about 92% cpu.

    so, download from the link above for the updated version.

  • well, curiosity got the better of me...

    here is a C3 version of ROJOhound's file. Uses mesh and built-in functions.

    On my computer the C2 version uses about 40% cpu. the C3 version uses about 25%.

    I hadn't played with mesh yet, and turns out it simplifies what C2 had to do with the Paster plugin. There are probably more optimizations that could reduce cpu further.

    https://www.rieperts.com/games/forum/Cloth.c3p

  • You can check the family object's "ObjectTypeName" property to find the name of the sprite. You can also give the family instance variables, and then assign each sprite in the family appropriate values.

  • Do you have web hosting that can create MySQL databases?

    From C3 you use AJAX to call a PHP script on the server that reads and writes to the database. There are a number of tutorials to help get you started.

    If there are not very many activities, they could be stored in a project file within C3 (using an array or json) and you can randomly pick from that.

  • I would be interested in some actual user testing here. People intuitively understand how to twist a knob. I am not convinced that users will understand that up always turns clockwise, down always means anti-clockwise. If I clicked on a knob, I would want to make a circular motion. Dop's first example seems more intuitive to me - although I would want the button to continue turning if the mouse/touch drifted off the button.

    I would say use a really nice looking slider if you want up = more, down = less.

  • when you run your project, if you press the F12 function key it calls up the Console / developer tools... shows lots of valuable details.

  • the error I got trying it out is:

    Access to XMLHttpRequest at 'https://construct-test.herokuapp.com/' from origin 'https://preview.construct.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    so you must allow cross domain calls on the server...

  • I am willing... but have limited time today. Will see how tomorrow goes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would use LayerToCanvas X/Y to get the coordinates on the current layer, then CanvasToLayer X/Y to get to the new layer at the equivalent position.

  • I can't see what the function does, but since it is called from the same "On start of layout" event, any objects created will not be fully created until the next top level event.

  • Yes, that is normal. When New instances are created they are not fully created until the next top level event is reached.

    You can use Pick last created, or Pick by UID, but other methods are not available until the event that created the instances completes (which includes branching to functions).

  • another thing that confused me in the past was the Date.GetDay is day of the week (0-6)

    Date.GetDate is the day of the current month (1-31)

    so make sure you use GetDate, not GetDay

  • ok, took some reading and testing, but it can be done - it just isn't as obvious as I expected.

    back in C2 I used to manually add or subtract a days worth of milliseconds (24x60x60x1000)

    but with the C3 Date plugin you can use the .ChangeDate (or .ChangeSeconds, etc...)

    the part that confused me for a bit was that you can't just say -3 for 3 days ago.

    (Today = Date.Now in following examples)

    if you say PastDate = Date.ChangeDate(Today, 0) the 0 means the last day of the previous month. So -3 means three days prior to the last day of last month, not three days ago from today.

    so, to get "3 days ago" you have to say PastDate = Date.ChangeDate(Today, Date.GetDate(Today) -3)

    or for two weeks from now you say NewDate = Date.ChangeDate(Today, Date.GetDate(Today) +14)

  • how do you need to format the date? I use the C3 Date plugin, and a function that takes a timestamp and a format string similar to what I use in PHP... no scripting or 3rd party addons required.

    https://www.rieperts.com/games/forum/FormatDate.c3p

  • have you tried right clicking on a blank area of the eventsheet, choose "Event Sheet" (at the bottom of the pop-up menu), choose "Font Size" and then click Reset.