dop2000's Recent Forum Activity

  • Or more particularly, how do I do an array or dictionary without it being like 500 events long

    Depends on what do you need it for.

    There are plenty of tutorials and official examples in C3, for instance:

    editor.construct.net

  • There are a few ways to do this. Most common method is to use an array or a dictionary to store the data about cards.

    You can also set card sprites as Global, then they will be transferred to a new layout. But be very careful not to duplicate them. If you have 10 cards on one layout and 20 cards on another, you can end up with 30 cards!

  • I've never used Dialogue Designer or any similar editors. I'm guessing they are pretty powerful tools and allow to construct very complex dialogues, that's why the JSON structure is so cumbersome.

    You can edit or convert the JSON before importing it into your game. For example, you can straight away get rid of the parent array - remove "[" and "]" from the top and the bottom of JSON string. This way you won't have to add "0." to access any key.

    The "nodes" is still an array, so to find a particular dialogue you will have to iterate it, for example:

    For Each entry in "nodes"
    Compare two values JSON.Get(".node_name")="6291363"
    

    You can create a function for it, which will search the JSON for a particular dialogue id and return the path to it. For example:

    JSON Set Path to Functions.FindDialogueByID("6291363")
    MyText set text to JSON.Get(".text.ENG")
    

    As the result the text should show "Good for me? Absolutely right - I'm a dog!"

    Another option is to convert "nodes" array to a list of objects and maybe simplify JSON by removing all unused keys. You'll either have to do it manually or perhaps create a small tool for it. The resulting JSON may look like this:

    {
     "dialogue_dog": {
     "character": "Player",
     "choices": [],
     "text": "Hello, I'm a dog!"
     },
     "dialogue_dog_response1": {
     "character": "Player",
     "choices": [],
     "text": "Good for me? Absolutely right - I'm a dog!"
     }
    }
    

    This way you could access any dialogue directly by its key name without having to loop through the array. For example "dialogue_dog_response1.text"

    By the way, check out this demo, it shows paths to all keys in JSON:

    dropbox.com/scl/fi/3lvdqp1x1v57xy0prahrj/JSON-RecursiveRead.c3p

  • Have you seen the examples included in C3? There are literally hundreds of small games, many of which are in retro style. You can learn a lot from them, or even use one of the examples as a template for your own game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Scripting is supposed to complement the event system, not replace it completely. Many features and methods are not available in scripts, if it's not in the documentation, then you'll have to use events.

  • Yeah, I noticed this too. There are a few other small things with the Search functionality that I think need fixing:

    construct3-21h2.ideas.aha.io/ideas/C321H2-I-509

    Hopefully Ashley will start a new suggestion platform in 2023, where we could post these proposals.

    Try writing to supportorj@construct.net

    Scirra really needs some kind of after hours support channel in case of severe outages like this!

  • There may be a hundred different reasons. Press F12 and check messages in browser console, it will tell you exactly what is wrong with the project.

    I'm seeing this question asked almost every week here. Developers should really add more info to that error message.

  • Or use "Set vector X". For example, if the enemy is to the left from the player:

    Enemy Set Vector X to -100

  • It knows about C3 from the internet, obviously. And it does a good job trying to derive a plausible answer from the data it got. Unfortunately, the answer is totally wrong and a big part of it is simply made up.

    It should at least add a disclaimer that the provided solution may be incorrect. Or just admit that there isn't enough data to answer the question.

  • To allow numbers only you can set Type=Number in textbox properties.

    Here is a more advanced demo:

    howtoconstructdemos.com/filter-typed-characters-in-a-textinput-box

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies