Ashley's Forum Posts

  • Moved to Scripting forum.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • MoveTo basically ignores all the properties of the timeline, and just does the default MoveTo movement between each point on the timeline. The feature only exists so you can set up a path to be followed visually using timeline points.

  • Do the "split string" and "join string" actions have a field to define what is the separator ?

    Yes, of course.

  • So I tried opening that project and previewing it. The first preview takes a while as it has to render and compress ~2000 spritesheets, but during that time Chrome's task manager showed the memory usage of the editor hovering around 1GB, so it looks like it managed it OK. Then the preview successfully started. Then I closed the preview and started it four more times; each time worked fine and started pretty much instantly (as all the spritesheets are already prepared).

    So it seems to be working fine for me here. I think a bigger problem is Construct is estimating one of the layouts uses 5.6 GB image memory, which is colossal - many machines probably can't handle that much memory in one go. I have a high-end system with both 16GB system memory and 16GB VRAM. Lesser systems will probably crash. If that's the issue, then it's up to your game design - the blog post Remember not to waste your memory is old now, but its main point is still relevant.

  • I still don't think this is the right approach - naturally next there'll need to be inserting at index, deleting at index, appending to end etc. - and that is basically reinventing everything the Array object does.

    For the next release cycle I've added a "split string" action for Array, which can take a string like "1,2,3" and set the array to hold those three elements, and a "join string" expression, which can return a string like "1,2,3" of the array contents again. Then you can use all the existing Array features to set, delete, insert etc. items before returning a string again.

  • Construct has carefully designed memory management features to ensure it can handle large amounts of content. Can you share a project that demonstrates the problem? You can just fill it with dummy content.

    Also are you on a 64-bit system? If you're trying to use >2GB of memory on a 32-bit system you may run in to the limitations of 32-bit memory.

  • As noted in the manual, you can only request fullscreen in a user input event, like a touch start or a button click.

  • The Audio object has actions to preload and play sounds. Why not use that?

  • There are already lots of examples built in to Construct in the Example Browser. Check the scripting category. For example the Guess the number example uses imports for events.

    The message about using default exports is probably because your import/export syntax is wrong. Some forms of import require the thing being imported to have a default export, and if it doesn't, it won't work. If you don't export a default thing, then you need to use the import { NamedThing } from "./script.js";. This kind of thing will be covered by JavaScript language tutorials, which I strongly recommend you follow if you are not already familiar with JavaScript, as it will save you a lot of pain and confusion like this. In fact our own Learn JavaScript in Construct guide has a section that covers modules in brief - take a look at that.

  • You can upload files to free services like Google Drive, OneDrive or Dropbox.

    myVar is still undefined in the script block in the event sheet. You need to use an Imports for events script file to import things you want to use in event sheets. See Scripts in event sheets in the manual.

  • But expressions aren't meant to change things - that's what actions are for. I think a one-dimensional array would be better in this case.

  • Use either globalThis or modules (with import/export) - don't try to mix and match both.

    It's difficult to help without seeing the full project - try sharing your project file to get better help.

  • If you run in to any problems using Construct please file an issue following all the guidelines, as we need all that information to be able to help.

  • I don't think this makes sense. What is it returning exactly? Construct does not have an array expression type at the moment. Further, the design of Construct is that expressions are usually read-only and don't actually themselves change things - that's what actions are for.

  • It looks like it's trying to load a developer mode addon that is not available because your local web server stopped responding. Clearing the browser data should remove the addon install.