dop2000's Forum Posts

  • See these two files:

    https://www.dropbox.com/s/8zap7yuhwdb0p ... .capx?dl=0

    https://www.dropbox.com/s/r1em8npglbdso ... e.png?dl=0

    (I downloaded them from some old post, which unfortunately I can't find now)

    This example may look different from what you need, but it basically does the same task - connects occupied tiles on the tilemap to each other.

    So if you have two tiles, one at (0,0) and another at (0,1), you need for the first one to select the tile with exit on the bottom, and for the second tile - with entrance on the top. And so on..

    You can do all this with an array instead of the tilemap.

  • Music should continue playing when you change layouts. You probably have an event "Play music" somewhere that is triggered when you go to another layout, that's why it gets restarted.

    You can do this:

    Audio tag "music" is NOT playing -> Audio play Music with tag "music"

    This way even if this event is triggered multiple times, it will not restart the music that is already playing.

  • Here you go:

    https://www.dropbox.com/s/mvkeozz88p943 ... .capx?dl=0

    May not be the most optimized code, but it works.

  • You don't need a button to save or load.

    You can save/load the game automatically whenever you like - before changing layouts, or when layer mission is complete, or when player collected some item etc.

  • There is a link to capx file on the left....

  • You can use find() and mid() expressions:

    Set position1 to find(text, "Chapter1")

    Set position2 to find(text, "Chapter2")

    Set resultText to mid(text, position1+len("Chapter1"), (position2-position1))

    Of course you should add various checks in case any of these chapters don't exist, trim spaces and line breaks etc.

  • Check the Tutorials section, there are lots of examples:

    https://www.scirra.com/tutorials/all

    Here is one with the start screen:

    https://www.scirra.com/tutorials/1261/f ... ng-objects

  • Set "Default controls=No" in Platform properties.

  • If you are subtracting health on collision event, then it's very unlikely that 50 zombies will collide with the wall all at the same tick (1/60 of second).

    But yes, it is still possible that more than 1 instance will collide, so you need For each loop:

    Zombie On collision with Wall

    System For each Zombie -> Wall subtract 5 from health

    Or use the PickedCount expression:

    Zombie On collision with Wall -> Wall subtract (5*Zombie.PickedCount) from health

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add this condition:

  • capx is your Construct 2 project.

    Save your project as a single file. Upload it to some website like dropbox.com, share the link here. See this post on how to post links with low reputation:

  • I don't have other solutions for you. It's not easy to make a universal app for all screen sizes and aspect ratios.

    Scale Outer method allows to make layouts that are "compatible" with different screens, but it's not perfect. You need to deal with the background and off-screen objects etc.

    If you don't like this, you can simply design different copies of the same layout for different aspect ratios (4:3, 16:9, 18:9 etc.), or even build different apps for different screens.

  • If the path is circular, as on your picture, it's easy. You can pin the platform to another sprite (pivot point) and rotate that sprite.

    If needed, change the Platform angle of gravity as well.

  • I would remove "trigger once" from event 76, otherwise your screenshots look ok to me.

    I suggest debugging. Run the project in Debug Mode (Ctrl-F4), get to the point where your game glitches, pause it and check everything.

    You can also add "Browser Log" actions to your key events to output variable values, animation names and other useful information. This often helps to understand the sequence of events in the project.

  • Wait and Trigger Once are probably the most misused events in Construct.

    Trigger Once is executed once when other conditions in this event are all true. (or, if there are no other conditions, then it will be triggered once on the start of layout).

    If other conditions become false and then true again, then this event will be executed again.

    Many beginners think this event means "trigger only once in the game", which is wrong.

    Wait is a convenient way to add a delay, but I prefer only using it for unimportant stuff and short delays - like Wait 0.5s, spawn Particles. It shouldn't be used in situations where you control game mechanics.

    Imagine you have an event like this:

    On collision with PowerUp sprite -> Player Set speed to 500, Wait 5s, Set speed to 200

    What happens when you pick up one power-up, and then after 4 seconds pick up another one? You expect it to "recharge" your speed for additional 5 seconds, however after 1 second the first "wait" kicks in and resets the speed back to 200.