Magistross's Recent Forum Activity

  • Timer is the way to go. The first timer is started manually, and it restarts itself until no more tile needs to be drawn.

    I used AdvancedRandom to generate a random drawing pattern, however the plugin is not needed if said pattern is created by hand.

    drive.google.com/file/d/1qxTOoxgSK_BRAESGFGwUaqXit8fYwptN/view

  • XYEzawr I'm not sure if I understand your issue correctly, but it looks like you are triggering more than one dialogue at once. You should make sure in your game logic that dialogue activation is limited to only one activation at a time.

  • My guess would be that you are expecting a global value to change via that text command. However, the {setvalue} command uses the "GameVariables" dictionary as its destination for changes.

    You can either revise your logic to use that dictionary and the Mansion_Phase key, or, you can create your own text command that affect global variables directly, whichever is more convenient for you.

  • Impressive display. I had not thought about feeding the dialogue array directly through another method than those already present in the template. It's definitely easier to edit a human readable JSON file than anything else the template used.

    Good job !

    If only the JSON object existed back then... I wouldn't have needed to use that convoluted "JSON Array into Dictionary" method.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another thing you might want to keep up your sleeve, the C3 JSON object can parse and stringify complex Javascript objects. I don't know about its performance in terms of speed, but it shouldn't be that much of an issue if you limit your back and forth between JS and C3.

    Here's a basic example : drive.google.com/open

  • What kind of operations you need to do with your array data ? If it's nothing fancy, you might opt to not pass anything between JS and C3, and rely entirely on C3 Arrays and its API.

    If not however, I believe JSON is your only recourse.

  • Give me a Pixel

    Did some tweaking. Removed the ability to do a 180, unless that's the only move possible.

    File was updated.

    drive.google.com/open

  • I simplified things a bit. Dunno if I went overboard and altered your original idea of movement by mistake...

    drive.google.com/open

  • First of all, with such a tiny array, you could probably get away with doing thousands of full scans in a single tick without noticing any sort of slowdown.

    That said, if you still want to optimize it in a way to reduce redundant checks to a minimum, we need to know a bit more about what you are actually trying to do.

    In particular, could you perhaps elaborate on this sentence : "If I find the value, I would remove it from that cell but possibly add the value elsewhere in the array".

    Is the value shifting conditionnal ? (if so, what is this condition ?)

    Where do you move the value ? (same row, column, anywhere in the array)

    Do you "set" another cell, or do you add a cell value to another ?

  • Here you go : drive.google.com/open

    You need to also load the jQuery UI lib and the stylesheet. You assign an ID (in the property window) to the input box, and call the "datepicker" function on it. I wrapped the call in a setTimeout to delay the execution by a tick since the DOM doesn't seem fully loaded on "start of layaout".

  • JSON.Get("text.0") should work. However, are you sure your JSON is correctly parsed ? Those backslashes need to be removed, otherwise the JSON is invalid.

  • Oh yeah, right, asJson could certainly work. You'd still have to save the object type somewhere if you wanted to save multiple types in a single array. Or you could also use one array per object types.

    Updated my file yet again.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies