Nthepanda's Forum Posts

  • You can add a family instance variable like this:

    Unless there is something else I need to know, everything else should work in families.

    Just put all of your towers in one family and use the previous events I posted.

  • Sorry for the confusion.

    The problem is that whenever I save the array to local storage, it just saves an empty array.

    I changed the text to a text input instead and set the:

    Set local storage "key" to "array.asJSON"

    to be:

    Set local storage "key" to "textinput.text"

    and put the text input off-screen, and now it works.

    It's kind of a workaround solution, but it works perfectly.

    I'm pretty sure you're right, lionz, and it was just a weird bug.

    I'm still unclear on what the problem was, but it's fine.

    Thank you!

  • I just wrote some code to store data in an array about the coordinates of platforms in a level editor, and was testing it by adding a text box and put:

    System: Every Tick --> "Text" set text to "array.asJSON"

    And it just outputs an empty array.

    But in the Debug Console, it looks perfectly fine.

    And I use the browser object's alert function and it works?

    But then I use the local storage function like I intend to in the final version, and it just goes back to the same empty JSON text.

    What is happening?

    Tagged:

  • That should work.

  • I would probably use a for loop and the combination of the functions:

    mid(text, index, count)

    find(src, text)

    https://www.construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

  • I have a similar problem with Google Drive and Microsoft Edge. Whenever and however I try to open a file directly from Google Drive it just gives an error message, and when I download the file it says, just like your problem, "Check that this is a valid C3P file."

  • The third event is not triggered at all. I am afraid I am using the wrong trigger, but I do not have as much experience with the File System as other objects.

  • I already tried browser logging, and this is a file that users will make in another place and then upload into the project.

    Take Micrsoft Word for example:

    It doesn't have save slots, that would be stupid.

    And it has no way to know what the user's file will look like.

    I can't download a copy of a file someone makes on my program a month from now.

    And I already removed that event. Sorry, bad picture.

  • So I want to make a game with a level editor that lets you save an array containing the positions of the platforms. This worked perfectly, and upon opening the file in notepad it does in fact show the positions of every platform. But when I try to load the file into my game using the following code:

    I did some testing and the first two events seem to work, but the third one does not execute at all.

    What am I doing wrong?

    Tagged:

  • I have solved it by myself. What I found comfortable was to simply test if the person the message was coming from was already mapped out, and if so than tweened them correctly, but if not than created a player at that position. If you did not get a message matching a character for ~5 seconds, than they were removed.

  • I just went and tested it myself, adding two different tiled background jump through platforms and it worked perfectly fine. If I had the project files, I could give you more information, but I can't think of any other problem that could be happening.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I understand. If you want the sword to only have collision on a certain frame, simply say:

    Sprite/Compare Frame = 4,

    Then Sprite/Set Collisions Enabled

    System/Else

    Then Sprite/Set Collisions Disabled

  • I think I understand your problem. My first suggestion is to instead of positioning the objects yourself, look at the values of the object in the properties bar and make sure the Y values of both of them are the same. This will not work if their image points are in different places or if they are different widths, but just do a little math to make sure they are precisely lined up pixel to pixel.

    To prevent this from happening in the future enable grid lines and grid snapping in the layout options.

  • I have run into similar issues with other complex movement behaviors and the simple answer is to just add the Custom Movement behavior and use the action Push Out Solid. Note: if the parameter "Opposite Angle" does not work, try "Nearest", and then try the action Push out Solid at Angle.

    One of those should work!

  • Oh my goodness this is what I have been saying construct 3 needs for so long!

    Thank you!