dop2000's Forum Posts

  • Well, you are setting plane position to touch position, of course it immediately teleports there. If you want to move it slowly, the easiest option is to use MoveTo behavior. You can configure its speed and acceleration/deceleration.

    Also, I don't understand why you are comparing touch speed. It's only useful for swipes.

    So all you need is a simple event like this:

    Is in touch -> Plane MoveTo Touch.x, Touch.y

  • If you need to position the camera there, the easiest way to do it is with lerp:

    Camera set x to lerp(Obj1.x, Obj2.x, 0.5)

    Camera set y to lerp(Obj1.y, Obj2.y, 0.5)

    With more than 2 objects it's trickier. You can use the method in this demo, position the camera in the center of green rectangle.

    howtoconstructdemos.com/draw-a-bounding-rectangle-or-a-perimeter-around-multiple-objects-capx

  • Hey, thanks! I'm a cappuccino guy :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use unixtime expression. It's a real-time clock on the device.

    When the upgrade button is clicked, save unixtime in local storage.

    To check how much time has passed:

    int((unixtime-saved_unixtime)/1000)=number of seconds

    int((unixtime-saved_unixtime)/60000)=number of minutes

  • Have you tried Scale Outer mode? See this example:

    dropbox.com/s/t26uee766dyqdss/TestLayoutScale.c3p

    Or do you need to limit the minimum scale at 100%? I.e. - if the window is bigger than 1024x1024, then the layout is scaled up, but if it's smaller, then the layout is cropped?

  • Mikal Thanks! There is a "Buy Me A Coffee" button in each demo page. Maybe we should put a bigger banner/button on the homepage.

  • Oh, it's a part of ProUI, I though it was a different plugin. If this is mainly for UI controls, then I guess my questions are irrelevant.

  • Over the last month I have posted many of my demos to the forum, but it has become clear that I need a better method of indexing my ever growing list of Construct 2 & 3 examples.

    To that end, dazedangels and I created: HowToConstructDemos.com

    How To Construct Demos is an index for my current and future Construct 2 & 3 examples, tips&tricks and template games.

    You can easily search for examples to help solve a specific problem or scroll through the site for inspiration. All downloads are stored on DropBox and are updated as needed. There is a short preview for each demo.

    All the example demos and template games are free to download, but donations are welcome.

    Enjoy! :)

    Tagged:

  • You can save a table in Excel in CSV format - it's a plain text file, which is easy to read and parse in Construct. There is an addon for C3, but you can also simply use tokenat() expression to parse it.

    Exporting the data from Construct back to Excel is also easy:

    dropbox.com/s/l9h6wv3t4x9amhz/ExportToCSV.c3p

  • I can't help without seeing your project file or events screenshot.

  • Mikal Interesting! How does it work with multiple instances? For example if I have 3 green 'parent' sprites and 10 pink 'child' sprites - which children will be linked to which parents?

    Also, is it possible to choose which properties are copied from the parent object? For example, I want to copy position and angle, but not scale and opacity.

  • 10 Gb is insane! I don't think that fiddling with sprites (loading/unloading them) will make much difference.

    You definitely need to rethink how you manage animations in your game - significantly reduce their size, use fewer frames, break into modular sprites (see Spriter), use effects instead etc.

  • I believe any pending wait actions are cancelled when you change layouts.

  • Put all these sprites on the layout, and destroy them on start of the layout. They will be loaded into memory, and there will be no lag when you create them in runtime. (But there will be a bigger delay when the layout is loaded)

  • You can easily prevent this - instead of "Pick nearest" sprite to touch position, use "System pick by overlapping point" event. Pick the Big sprite that's overlapping point Touch.XAt(loopindex, "HUD"), Touch.YAt(loopindex, "HUD").

    You may want to make the collision area of the Big sprite slightly larger than the image.