dop2000's Recent Forum Activity

  • Space width can be configured the same way as any other character width - either in Spacing Data in spritefont properties, or using "Set Character width" action.

    Here is a popular tool for making spritefonts:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    It outputs a text file with everything you need to configure a spritefont in C3.

  • Have you checked if your server receives any data? Maybe it doesn't give any response?

    You can also try "AJAX Request URL" action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use the Array Editor - in Files folder create a new file with "array" type, and you will be able to create a 2D or even 3D array as a table, very similar to Excel.

    Then you will need to load this file into an Array object:

    + System: On start of layout
    -> AJAX: Request ArrayFile.json (tag "arr")
    -> System: Wait for previous actions to complete
    -> Array: Load from JSON string AJAX.LastData
    
  • The JSON structure is really complex, I don't understand what half of the keys there are for. Is there a way to disable features which you are not using, so that they are not added to JSON?

    I made a few changes in your file, nothing major, just to show how to access any dialogue and how to iterate the list of choices:

    dropbox.com/s/rlfmwvidshi4o8e/DogDialogueTestTake3.c3p

  • So yes, I'm going to have to do on each individual card spawn, change some variable, so it's going to be like 500 events.

    Why do you think it will be 500 events? Do you have each card as a separate object? Even then you can combine them into a family and use a single event:

    Cards On Created: Array push back value Cards.ID

    or something like that.

    However, if you are planning to use the array to store cards, then it should be the other way around - you create cards from the array:

    Array For Each X : Create Card; Card set ID to Array.curValue

  • 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/s/srgf9lme08by9wa/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.

  • 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.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 269 followers

Connect with dop2000

Trophy Case

  • 9-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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

29/44
How to earn trophies