DUTOIT's Recent Forum Activity

  • PABERB,

    How to not get help - spam the board with multiple topics asking the same thing.

    So my answer for this topic and all the others.

    Its called search - use it.

    Its called a manual - read it.

    Its called a tutorials section - go look there and search.

    The only hard one is the plugins section

    And special hint. Check out the plugin section - lots ofplugins for imports available there.

    Here is a nicelist of plugins.

  • part12studios,

    Yip, your formating was wrong.

    Attached corrected puns.json it works now.

    Sidenote: see my gravatar - that's my son, and his name is Caleb too

  • Can you attach the capx?

    Go full editor - and upload attachment and attach the capx of your test.

    That will save us time. I suspect your json isn't formated correctly.

  • Agree with manley23, your browser.queryparam returns nothing and therefor saves nothing.

    or

    the stslogin value never equals 2

  • Think of it as a list.

    0.0 Joke 1

    >0.1 Joke 1 Punchline

    1.0 Joke 2

    >1.1 Joke 2 Punchline

    The confusing thing is that in code it counts first intance as 1. So 0 is 1 instance. 1 is 2 instances.

    ["Joke 00"], array.at(0,0)

    ["Joke 00 Punchline"] array.at(0.1)

    ],[ ["Joke 01"], array.at(1,0)

    ["Joke 01 Punchline"] array.at(1,1)

    ],[ We work in 3 dimensions x,y,z In the above we working in 2 dimensions x,y and z we make it 1 So X is the number of cards and we randomize x cardnumber = floor(random(1, numberofcards) we choosing a random number between 1 and #Number of cards. I am not including 0 because I added a card1/totalcards and wanted it too look good. You can add random(0,totalcards) if you want. And number of cards is how wide is x and we can find that out by using array.width y is the 2nd dimension, the bullet points of the card. We only have 1 now, which is punchline. So it looks like this 2 jokes and 2 punchlines (x,y,z) (2,2,1) So to get joke 2 array.at(1,0) and get joke 2 punchline array.at(1,1) Make sense? The trick is to play around with it. Once you master this, you won't ever look back. Ninja'd by Manley23, I guess I took to long in the editor.

  • Create a function... that is what it is meant for.

  • >

    >

    what is My 2 cents?

    An expression that means: My opinion. My input. My point of view etc etc etc etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My 2 cents.

    There are already enough sections.

    Agreed.

  • Thank you guys. Like said, I don't feel limited by C2 for PC. For mobile it's a different story. For instance, this adventure project would simply not work with cocoon or ejecta as it relies heavily on the XML plugin to load the game data. If fact it's kinda lame, the reason I went with a complex dynamic scene loading rather than having each scene stored in a different layout, was to get around the memory limitations of mobile devices. Turned out I introduced a new problem with XML

    Do you need XML?

    You could save data in json and import it using ajax and load it into your flavor of Dictionary or Array.

  • OlivierC, Bravo - seriously that is seriously awesome. I immediately thought I was playing Indiana Jones (Lost Ark, Atlantis, etc)

    Brilliant, brilliant, brilliant.

  • Yes, you will get all future updates for the life of Construct2.

    C3 - Construct3 would be a entirely new software and if you want to buy it, you can (but you won't find it, it doesn't exist, and won't exist for a number of years)

  • Manley23 has the right xy approach above.

    And

    "c2array":true, is what construct2 uses to json the data into either array or dictionary. It isn't part of json, but a c2 thing

    What I did was build it in construct2 first. Used the array download to download to json. And used that json to be imported.

    Attached is capx of events used to create array, then download to json. I toggled the include CreateDatabase event sheet.

    I am using the xy, but out of habit I include z = 1

    There are 13 because arrays count 0 as 1, which is why I minus one from TotalCards to get correct display of number cards. Array.Width is 13, but we don't want card 0.

    So we 13-1=12 cards

    And random(1,13) because we don't want to include card0

    The above is only for cosmetic purposes. Showing Joke 6of12 for example.

    Now that you have how i created the database, play around make your own then import it into files and change the Ajax->Request to reflect your json file.

DUTOIT's avatar

DUTOIT

Member since 17 Jul, 2013

None one is following DUTOIT yet!

Trophy Case

  • 11-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies