dop2000's Forum Posts

  • If you want to save everything and allow players to save mid-level, use "System -> Save/Load" events.

    If you only want to save a few values - like the number of completed levels, number of lives left, score - use Local Storage. (former Web Storage)

    There are lots of tutorials you can check:

    scirra.com/tutorials/all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure I understand your issue.. You can add two instance variables to the Camera object - "targetX" and "targetY". Add this event:

    On every tick: Camera set position to lerp(self.x, self.y, self.targetX, self.targetY, dt*4)

    When varA=varB, set new values to targetX and targetY. And the camera will move automatically to the new position.

    .

    You can also move the camera with LiteTween addon and make some cool easing effects.

  • The variables could be global, or local static, or instance - doesn't really matter.

    Initial values could be 0. If you want to decrease the bar only when the finger is moving (not on initial touch), then you need to add another event "On touch start -> set previousX to Touch.X, set previousY to Touch.Y"

  • Add AJAX object to your project.

    Use "AJAX Post to URL" action, and then "AJAX on completed" event to check for response.

  • This is a common trick which allows to refer to two instances of the same object in one event.

    Event #6 picks one block instance with specific UID. Event #7 checks if that instance is falling.

    Now you need to find if there are any other instances of block overlapping your picked block, but you can't do that because block inside this event refers to only one instance with that UID.

    So the trick is to use the family. Family acts like a different object, so you can pick different family instances in the same event.

  • Add two variables - previousX and previousY.

    On every tick check if Touch.X=previousX and Touch.Y=previousY. If not, this means that the finger has moved. After that save new touch position into these variables.

  • Try this:

    If you have lots of waterfalls on your layout, add "Is on screen" condition to event #4.

  • As far as I know, Save/Load system works independently from the Local Storage. When you save or load the game, the contents of Local Storage is not changed.

    See this demo:

    dropbox.com/s/6fmdstyyke9wa9g/TimeAwayL-2Timers.capx

    You can start "Upgrade 2" timer, wait a few seconds, click save, close the window, open it again, click load - the timer will still continue running.

  • kriand, yep, I noticed the same.

    "System compare variable a=1 OR Object compare instance variable b=1" doesn't work. Definitely a bug.

  • The format of MapAsJSON is probably incompatible with Array.AsJSON

    You can output both into a text or browser log and compare.

    For example, array JSON should look like this:

    {"c2array":true,"size":[2],"data":["apple","banana"]}

  • Ashley admitted that there are issues with OR-blocks in Construct. You can test if your code is working if you break this event into two:

    1. Platform speed>250 ... Set test to 1

    2. Animation is playing ... Set test to 1

    .

    If two events work, but when you combine them into one OR-block, it stops working, then I suggest you make a small project replicating the problem and submit a bug report here:

    github.com/Scirra/Construct-3-bugs/issues

  • Try posting your question in the plugin post, people who commented on it will get notifications and someone might help you:

    construct.net/forum/extending-construct-2/work-in-progress-addons-30/plugin-spine-plugin-68156

  • In the "Image upload" box please add information that the uploaded image needs to be actually inserted into the message using the "img" tag.

    Many people don't know that and I've seen too many posts saying "see the attached a screenshot" and of course there was nothing attached.

  • Your text file contains line breaks. When you use tokenat() with ";" separator, the next token includes line break from the previous line. So your "glow" key actually looks like this:

    "
    glow"

    You need to add trim() to your expression to remove all line breaks, spaces, tabs etc from the beginning and end of the string.

    Or you can remove “;” and use line breaks to separate keys:

    tokenat(tokenat(AJAX.LastData, loop, newline), 0, "|")

  • Something like this?

    dropbox.com/s/6drs0fiqhkcdzag/TiledLine.capx