DiegoM's Forum Posts

  • tarek2

    I found two problems, the first one is that those files are malformed JSON.

    	"frame-durations": [1, 2, 3, 4, ...]
    

    That is not valid JSON, I wrote it that way in the first post to imply that the array can have any number of elements. I'll update that to make sure it works in case someone else just copies and pastes it. You can see if there are any errors if you bring up the console, but I will add a more friendly error message in the next beta release.

    I also found a bug that was causing the "sort" and "order" properties of a configuration file higher up the folder structure to not be picked up by deeper folders. At the moment "sort" and "order" only work as expected if the configuration file is in the same folder as the files it is meant to affect. A fix for that will be on the next beta.

    Hopefully the next beta will be more useful than this one.

  • dop2000

    I have been wondering where I should draw the line for this feature. This was developed in response to a suggestion (which I can not find) and the original idea was to provide a more convenient way to import entire animations, that should have been it.

    Your suggestion will likely be the last thing I will implement for this feature. The only problem is that it's a little more involved than the last two things I added (and I still managed to completely botch that!)

    I really don't know when I will work on it, so I can't give any estimates. I do want to implement it because it seems like a good addition before shelving the whole thing, that is as much as I can say.

  • newt

    There won't be a .1 release to fix the Animations Editor issue. The fix will come in the next beta release.

    I know it sounds like a cop out, but that is the point of the quick beta release schedule.

  • ninowebs

    A bug was introduced in this version which is causing most of the UI related to importing images files into the Animations editor to crash. The issue will be fixed for the next beta release.

    In the mean time you can still import images by dragging and dropping.

  • Let me update the first post with the new changes.

    Edit: Just updated the first post, let me know how it works for you.

  • It makes sense that if you pass 0 to the function it would do something strange.

    LoopIndex gives you a number as the loop moves from the start index to the end index.

    So in this case, if the start index = 0 and the end index = 0 - 1, then the for loop will be executed two times. The first time loopIndex will be 0 and the second time loopindex will be -1.

    If you plug those number in the calculation it is doing to place the bars, you will see it places the first one with no offset, and the second one to the left of the first.

    The function should have a special case for 0, so that it doesn't even go in the for loop and just exits early after destroying all the existing instances.

  • "Amount" is the function parameter for "CreateItems", function parameters look like local variables. You can try right clicking on top of the function and selecting "Add parameter" to see how adding more would look like.

    When the function is called, "theNumber" is passed in so then inside the function "Amount" takes that value. For this contrived example it wasn't really necessary, just using "theNumber" inside the funtion would have worked the same. If you try replacing "Amount" by the "theNumber" in the for loop, it should be the same.

    The reason I have the loop starting at 0 and ending at amount - 1, has to do with the calculation to position the items. I want the first LoopIndex to be 0, so the first item will not have any offset applied to it.

  • This is one way of doing it.

    dropbox.com/s/8u9ml9l2mld32pp/generateObjectsToMatchNumberCount.c3p

    The example doesn't do line breaks, so all the items are added in a single line, but it's a good starting point.

  • Look into the Set Instance action of the Timeline plugin.

    The Timeline Instances example project in the Start Page is a basic example of how to use the action to re-use a timeline animation with multiple different instances.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the issue is that the crouching animation is playing WHENEVER the arrow key is down and the uppercut, only when W is pressed.

    So what ends up happening is that the crouching animation is played, then for a brief moment an attempt is made to play the uppercut animation when W is pressed, but because the down arrow is continuously pressed, the crouching animation takes precedence.

    I think that you need to set a boolean variable when you press W to indicate that an attack has started and while that variable is true don't play the crouching animation, then it won't step over the uppercut one.

    You will need another event to know when the uppercut is complete, so you can reset the boolean and allow the crouching animation to play normally.

  • An easy way of doing it without scripting is to use the Load image from URL action on a Sprite instance.

    When that is loaded, you can use the Paste object action of Drawing Canvas to copy the image data over.

    After that you can get rid of the sprite instance.

  • Cool, well done!

    Before I forget, yesterday I found the full reference for the library, but it's a bit hidden away. It's very useful when you go past the basic examples.

    docs.mongodb.com/realm-sdks/js/latest

  • I am just guessing here, but judging from the console errors, there seem to be syntax error in either here

    const mongodb = app.services.mongodb("mongode-atlas");
    

    In this one, I don't think app has any property called services. Maybe you need to do something like this

    const mongodb = app.currentUser.mongoClient("mongode-atlas");
    

    Haven't actually tried this myself, just stitching together things I find that look like they make sense.

    The next line

    const collection = mongo.db("ServerDB").collection("UserAccounts");
    

    I think should be

    const collection = mongodb.db("ServerDB").collection("UserAccounts");
    

    Maybe that won't blow up, but it is still not doing anything useful, just getting some objects.

    Next you can try with

    collection.updateOne({ $set: { myNewProperty: "foo" } })
    .then(() =>
    {
     // Refresh the user's local customData property
     return app.currentUser.refreshCustomData()
    })
    .then(() =>
    {
     // try to console.log the custom data here to see if something changed
    });
    
    

    After doing this also check the database, to see if that was updated.

    I don't think I can help anymore without actually working on this :P

  • Just one more thing I noticed reading the documentation.

    docs.mongodb.com/realm/web/access-custom-user-data

    There is a warning about stale data.

    So you might want to try doing

    await app.currentUser.refreshCustomData();
    

    before getting the custom data to make sure you are getting the latest available.

  • It's hard to tell without looking at your project.

    If you take the example and just change the GetDate function to return Date.Get(2021, 11, 12, 19, 0, 0, 0), the count down works as expected. So I imagine that in the process of copying and pasting you maybe forgot something or there is something that needs to be changed and you missed it.

    The parameters for the Date.Get expression are as follows:

    year => 4 digit number
    month => 0 to 11
    day => 1 to 31
    hour => 0 to 23
    minutes => 0 to 59
    seconds => 0 to 59
    milliseconds => 0 to 999
    

    So Date.Get(2021, 11, 12, 19, 0, 0, 0) should get you the date for December 12th 2021 at 7pm