Wormhole's Recent Forum Activity

  • Okay, they might make it correct on the next version.

  • Yeah, it's confusing that arrays are shown differently. X axis is displayed horizontally in the array editor and vertically in Debug.

    So it means, it must be a bug?

  • Hi [DOP2000] quick question, My JSON array width is 1 and height is 90, on the debug mode it shows everything in one cell. If I Transpose it, then only it shows every element on the proper way, My question is, can we make it show the proper way even when the width is 1 and height is 90?

  • Thank you Thank you.

  • here the c3p

  • 1. Actually I tried it

      + Button: On clicked -> Array: Set value at MyArray.At(2) to 12909090

    but it doesn't reflect, I dunno what I'm doing wrong.

    2. That works, but if my array consists of 5,5,5,5 value, once I hit the button it shows 20, but if the user hit it twice it makes it 40, 60, 80 etc the same issue happen with on the start of the layout If I put it on the start of the layout, every time the layout restart the value of is keep doubleing.

  • Thanks, dop2000 bro, that was amazing.

    Two quick questions.

    Question 1. In another scenario, I have an array of a certain height and width and data on it. How can I replace an index of the array? eg. Value of index 1 is "1" when Player collide with an object or by clicking a button I want set it something else, for eg. "23".

    I don't want something like this. (Via)

    Because my array would contain mostly numbers, the same value might be repeated on several indexes.

    Question 2

    How to make the addition of all the value from the array.

    eg.

    How do I calculate all the array value and store in on a global variable? For example here if we add all the numbers the value would be 20.

  • Hi guys, me again. Happy New Year to everybody.

    Thing is, I want to make the array (which is imported from JSON) to random. Means every time I restart the layout or click a button the array value should be shuffled.

    I tried this way, but couldn't succeed.

    Please check this dropbox.com/s/kmns0c2u8g84rwf/Array%20Shuffle%20Exp.c3p

  • I'm not sure really what you are trying to do but maybe this will help.

    First, given the image, your events aren't going to choose a specific text object. You are using the system compare 2 variables event. This will trigger if it finds a value that matches but no object is selected so you don't know which object the system will choose. Most likely it will be all text objects.

    Instead, you should use a text event and compare it's variable. This is what your events would change to:

    Also, you can cut down your events simply by using the instance variable as the array index.

    WOW! This is what I wanted. Now I understand it. Thanks, you are awesome. :D

  • Hi, guys, me again. posting another noob question, sorry I just exploring array and instance variable and continuously having several questions.

    How do I set text of a text object by referring its instance variable?

    I tried to compare it by its instance variable but not working.

  • Posted this (Current) Question on the morning but it wasn't reflected to the community, it was not showing on my topic list either perhaps posted another, but now this question suddenly pop up out of nowhere, anyways, it was really a LOL moment for me because the solution you gave seems so simple and I was hunting it for all day (literally all day) _--_

    btw thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried to load Array.JSON file to array object, and want to retrieve array value from certain index, eg, from index 6, used this expression "MyArray.At(6)" but it seems like the AJAX import is not properly working, all the value it import from the json array stored in only only index.

    Kindly check this dropbox.com/s/5yzwumg4g3ym29c/Array%20Json%20Question.c3p

Wormhole's avatar

Wormhole

Member since 19 Aug, 2020

Twitter
Wormhole has 1 followers

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies