jdlendon's Forum Posts

  • Thanks for the tips and the example. I'll give it a try.

    Edit: It works perfectly, actually. THANKS. If you could mention a website where the type of symbols you used in the expressions are explained/defined that would be helpful. I'd like to know what the expression said, and how to create these kind of expressions myself.

  • Hi, thanks for your reply, though it requires a bit more programming knowledge than I possess. How do most people input large files of data into the arrays in their games? Like I mentioned, I'm using Rex's CSVtoArray plugin to put the csv into an array, then saving it as a .json file, which I can import into the game's files. I like using Excel to edit/update the data, and even though it is all turned into strings, I've recently learned that I can use "str" and "int" functions in events and actions to correctly interpret the data. But maybe someone has a better, more efficient method starting with Excel.

    Thanks

  • Hi, I just discovered, with help online, that when I use the CSVtoArray plugin, and then download it into a .json file, it is putting all my numbers into quotation, which means they're been converted to strings. I have a large excel file with the first row being used for column titles and also some rows being used for dialog. But mostly, there is a lot of number data. Is this something that shouldn't be done? Even when I use an online converter, from .csv to .json, it wants to do this. There are no quotation marks in the .csv file. Am I supposed to put quotation marks around any word or phrase in any box of the spreadsheet?

    Anyone have a better, easier method for getting this data into an array? I update the data quite a lot, so it needs to something fairly quick and easy. Any ideas are appreciated.

    Thanks

  • I just went to one of those online .csv to .json converter websites and it is also putting all the numbers in quotations. Is this something that happens if there are words and numbers in the .csv? I'm using the 1st column of the spreadsheet for the name of each row's purpose. There are also rows used for dialog. Should I not be mixing words and numbers in the same .csv before converting to .json? Maybe I have to use quotation marks before and after any box that has a word or sentence in it on the spreadsheet? I'll have to experiment.

  • I've been using the CSVtoArray plugin to copy the .csv file, which contains words along with numbers into an array, then downloading that array's data into a .json file. From then on, I only use the data in the .json file for the game, which has been working for me, thought with the added difficulties mentioned in the OP. Is there a better, easier way to get a large amount of data from a Excel file into an array for a game to use? I'd appreciate any help.

  • Ok, I see the quotes you are referring to. I just thought that was how .json files worked. I wonder how they are getting placed there from the .csv file?

  • Hi BlackHornet, and thanks for your time on this. The datafile in the capx is this (separated for clarity): https://www.dropbox.com/s/17n2tbu8351t6 ... .json?dl=0

    It seems to be a standard .json format. It loads the array with the proper data, all of which are numbers, and I don't think they are in quotes. Is this the data you are referring to? I'm using a .csv to .json converter to get the data from a .csv into .json format. Maybe that is where the problem lies?

  • I must apologize. I linked the wrong example file for you to see. Here is the correct one, based on your example you sent earlier: https://www.dropbox.com/s/r4hj8pspx3mot ... .capx?dl=0

    Thanks again

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I made an example of what I'm doing. Maybe you can point out what I'm doing wrong: https://www.dropbox.com/s/rvjnr3h59yq2k ... .capx?dl=0

    Thanks

  • Ok, upon further testing, I've found that if you actually set the value immediately before, and then you test the value in a subevent of said event, like BlackHornet did in his example above, then it does work. BUT, if I've loaded the values into the array from a .json file in a previous function and now I'm just comparing a value in the array, it still isn't working. Any action that reads the array works fine, but the condition comparing the value at xy to a set value isn't working. (I think I forgot to mention that the array was loaded from a .json file in my original post...)

  • Hello, I've run into a couple of problems enough times to think that I must be doing something wrong, or there are unusual limitations in how arrays work. Here's a couple of examples: 1) I have an array with data set up in it and I can use an action to tell me the value at a location in the array with no problems. But if I try to use the array location in a condition like "array: If value at (x,y) = 1, then... do this", it doesn't work. 2) If I try to combine actions into something like "multiply the value at array (x,y) times 2", it doesn't work either. For 1) I have to first set the value at (x,y) into a local variable and then use THAT in the event's condition. For 2), I have to use two actions: "set the value at array(x,y) to a local or instance variable and then use a second action to multiply or manipulate the value saved.

    Is this the norm?

    Also, how and when would you use the condition: Compare Current Value?

    Thanks

  • No ideas...anyone?

  • Hello, let me set up the situation. I have an object with fade behavior settings preset as follows: Fade-In Time 2.5 sec, Wait = 0, and Fade-Out time set to 0, not active at start, and no to destroy on end. Now, it performs as set when the "start fade" action runs. Now, according to the manual, if the Wait and/or Fade Out is set to 0, it is supposed to ignore those stages (and I'm assuming it should then read: "stage = done" after the Fade-In. But, instead, I'm noticing that the Object will, from then on, be stuck in the "fade-out" stage. If I later change the fade settings to something like: Fade-in 0 secs, Wait = 0, and Fade-Out = 2.5, (with no "start fade" action) it immediately runs the Fade-Out cycle after the changes. Is this a bug? I've tried various things like: event: on fade-in finished: set all the fade settings mentioned above. It still will immediately fade out, even though no new "start fade" action has been given.

    Any ideas, other than writing out a bunch of events without the fade behavior in order to manually do the fades properly?

  • Oh, I missed that sentence. I guess I'll be making my own button sprites. Thanks for the replies.

  • Hello, I'm trying to figure out why my button plugin objects are not obeying the z order I have set up on the layer they exist. They are going to the top of all the layers no matter what, and I have to make them invisible if I want them to not show through a higher z or higher layer object like a fade In screen object or whatever. Only the mouse will show above them. A custom cursor object I'm using goes under the button as the mouse goes over it. Is this a CSS issue?

    Thanks