Nepeo's Recent Forum Activity

  • I'm still having issues opening your project. I think the link you are giving me only works for you, try using "share" and then "copy link".

  • Yup I can confirm the esc key behaviour is frustrating... I personally try to only have function calls in the event sheet script blocks, and put the actual function declarations in a script file. Minimises this issue for the most part, and the text editor itself is more practical for large chunks of script anyway.

    As for the external editor there isn't currently a way to open an external editor from the browser. If your using the experimental local folder saves for projects you should be able to open and edit script files in your project quite easily. One caveat of this is that C3 won't be aware that the project is being edited, so you shouldn't have the project open in C3 at the same time or you might lose the edits you made in the external editor. This is something that might improve in the future, but the ability to read/write local files from the browser is very new.

  • Perhaps you should check what Chrome version they are using, there is a known issues with Chrome 79 that it is causing data loss for WebViews. Apparently it migrates profile data to a new location, but due to poorly written tests they didn't realise that they also needed to move localstorage, indexeddb, etc. After the update the data is still in the old location, but Chrome looks in the new one and hence assumes there is no data. I imagine at that point most apps would assume that it's a new users and create new data. Here is the issue on the Chromium bug tracker, it's caused a fair bit of drama for obvious reasons. They appear to be taking it seriously, but it's a bit of an awkward situation because anyone who has experienced this problem now has 2 sets of conflicting data. So it's not clear which data to preserve.

    I believe they halted the rollout on Friday so it won't be affecting all users, but the estimate is around 10% got the update... All a bit of a mess really.

  • Sounds like you basically want a static host for your blog posts and files. There are plenty of providers for this, I'd encourage you to look somewhere other than Dropbox though. They are a service for keeping documents on the cloud with access for specific users, not a static web host. On a slight tangent this reddit post about misusing Dropbox might interest you.

    You can use the AJAX plugin to request files from a server easily enough. You should be aware that unless the server is set up with the correct "access-allow-origin" header you will not be able to request files from it if your web app is running on a different domain. For instance if you had web app on myblogapp.org and the files on blogstorage.org, then blogstorage.org will need to add the header "access-allow-origin: myblogapp.org" to all requests it serves. This can of course be solved by keeping the app and the data on the same domain.

    GitHub pages is an example of a free hosting provider which could allow you to implement something like this, I don't think they offer configuration for HTTP headers so you would have to host the data and the app on the same domain.

    Another option is AWS. The service itself is quite complex to find your way around, but last I checked there was a quick setup button on the AWS console homepage for creating a static web pages using S3, CloudFront and Route 53 ( storage buckets, CDN routing and domain name services ). On AWS you pay for usage, not a flat fee. For a low traffic site your probably looking at less than £1 a months for hosting and £8 a year for your domain name.

    I've heard netlify is also quite good, and easy to set up. But I don't have any experience with them.

  • Thanks for the feedback!

    The data editor doesn't currently do line wrapping or respect newline characters when rendering a cell. If you want to insert an actual newline into the cell then you can use shift+enter to add one. But you can only see them when your editing that cell.

    It's something we could potentially implement, but hasn't been considered important so far. Perhaps if you could post this on our feature request platform construct3.ideas.aha.io/ideas we could gauge how important people think this is?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wasn't able to match with another player to try that game properly unfortunately.

    Using a separate object for the camera is a pretty useful technique. For instance it could normally follow your character, but when another player gets close enough it could center halfway between that player and yours. I'd implement this by searching for players within a certain distance of your character, then averaging the position of the players to find a common center. Then smoothly move the camera to that position. I imagine the radius around the player would ideally be min(height, width) / 4 so that there is some space around the players.

  • Take a look at Function maps they allow you to select a function using a string.

  • It's also perfectly possible to do without any knowledge of coding, but I consider the JS versions simpler ( working with time is not easy ). There are a number of expressions related to time available. If you take a look at the documentation for system expressions under the heading "time" you will see them. The one you want would be unixtime, which returns the number of milliseconds since the epoch (1st of January 1970). We unfortunately don't have expressions to convert this into hours/minutes/seconds etc. so you have to apply some maths to get a useful answer. If you would rather use this method here are the expressions for converting unixtime into a more usable format.

    Seconds = floor(unixtime / 1000) % 60

    Minutes = floor(unixtime / (60 * 1000)) % 60

    Hours = floor(unixtime / (60 * 60 * 1000) % 24

    If your a little confused how those work basically they take the number of milliseconds since the epoch. Next they change it to the correct unit by dividing it ( 1000 ms in a second so divide by 1000, 60 seconds in a minute so divide by 60, etc. ). Then the value is floored (rounded down) so it's a whole number. Finally we use the modulo operator to wrap the value, keeping it in the range 0-60. In the seconds example this changes the value from second since the epoch, to seconds since the last minute.

    One gotcha here is that that conversion doesn't include any timezone correction, so they are for UTC.

    I'm happy to take a look at your project, but I don't appear to be able to access it from that link.

  • Thanks for that Salman_Shh and Mikal. I agree we could probably do with some more/better examples. The existing one was basically a direct copy of the XML example, which isn't that detailed to begin with. I guess the difficulty is that the plugin has a lot of ACEs, and they can be used in a wide variety of ways. So it's hard to have an example that completely demonstrates the plugin. We could perhaps have a tutorial that demonstrates each action in context, as well as some combination techniques. I imagine it would take awhile to write though.

    Using the plugin as a custom data type wasn't something that we initially expected, but in practise it works quite nicely. Some of the newer ACEs were adding because they are useful in that context.

    As for the text editor; you should already be able to collapse objects and arrays by clicking on the arrows in the gutter. It would be nice to add some JSON validation logic akin to what we do with JS, I'll try and see how much work it would be.

  • Looking at your PHP script and what it was outputting it appears that you were putting objects in the array. Construct array objects are 3D arrays that can only contain strings and numbers, so it can't understand that. Have you considered just using the JSON plugin instead? It's a lot more flexible about the structure of your JSON file.

  • The easiest way I think is to just use a little JavaScript block.

    If you create a Date object without any parameters then it will be initialised with the current time.

    let now = new Date();
    

    The Date object has a lot of methods for getting things like the date, month, seconds, etc. as well as formatted text of the current date or time. You can get the values you specified using:

    let now = new Date();
    
    let minutes = now.getMinutes();
    let seconds = now.getSeconds();
    let milliseconds = now.getMilliseconds();
    

    If you haven't used JS before you can insert a new script block into the event sheet by right clicking on the event you want to add it to and selecting "Add > Add Script". It will run every time that event block does, just like an action would. You can modify local variables using "localVars." then the name of the variable, like so:

    If alternatively you just want to print the current time you might be interested in

    let now = new Date();
    let time_string = now.toLocaleTimeString('en-US');
    
  • Nice work Salman_Shh. Looks really tidy, and impressively well featured. You say you've been using the JSON plugin for it, do you have any feedback? I feel like it's got quite a mature feature set now, but I'm aware it's uses have grown beyond the initial concept.

Nepeo's avatar

Nepeo

Member since 8 Mar, 2016

Twitter
Nepeo has 583,792 followers

Trophy Case

  • 8-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies

Blogs