kroftek's Forum Posts

  • Some values stored in the .json files were indeed categorized as strings, seeing how they were between quotation marks. So seeing how these values are inserted via TextInput, I suppose it automatically treats any text input as strings, even though the type is strictly set to "number".

    Therefore I guess the workaround is to put the text input into a variable first, and then proceed with calculations and stuff...or is there something I'm missing?

  • The project I'm currently working on seems to be having issues with the simplest tasks involving arrays and calculating values inside them.

    Something as simple as this (and what I recall has always worked flawlessly so far) doesn't work for some reason:

    calculate 5 values and put the sum into an specific array position. However, only the first value in that equation is taken into consideration. So, if say, all values are 500, the sum will be 500. If I change the first value to 1000, the sum will be 1000. Other values are simply not considered at all.

    Yet another issue. The first block works properly, just adding pre-determined values instead of fetching them from other array cells seems to work. However, in the following two blocks you can see that I needed to introduce variables because that is the only way it works. If I have values of, say, 10 in array cells I need to fetch for this equation, it will refuse to calculate them properly. But if I take an extra step and make that value of 10 via an variable, and calculate it that way, it works.

    But then, the last two blocks just flat-out work, even though nothing would indicate that would be the case seeing the previous issues.

    Any thoughts on why this happens? Is it possible that one of the updates screwed up array behavior, because I have stared way too much into my event sheets and just don't see any reasons why they should behave like this?

  • I have started a new project and can save normally...for now, at least.

  • So I've started some work on a new project, and apparently I cannot save anything. This is the first time in 11 years using Construct that I've had this happen.

    When trying to save a single file, save a project folder, or download a copy, i get this:

    And when I try to save it to cloud, I get this:

    What is going on?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, it all seems to work fine now. Thanks for the help.

  • Because the numbers contain commas, they are sorted as text, alphabetically. For example "209" goes before "21", because as a character "0" is less than "1".

    You need to remove commas in the array, then they will be treated as numbers. And then format these numbers before displaying them. For example:

    Set text to int(number/1000) & "," & (number%1000)

    That seems to do the job, but all numbers should have 3 decimals, for instance 30 is represented as 30.0 when it should be 30.000.

  • Can you share a demo project?

    dropbox.com/scl/fi/mqtpdfkt8ikwc3m9ima95/MultiSim5.c3p

    Hope the link works. Press the blank button on top and then the "Coefficients" button.

  • So I'm using an array which should sort numbers from biggest to lowest. I'm using separators (3 decimals), so it's for example: 12.500, 10.250, 8.666 etc. But apparently C3 sees this as some weird alien concept and doesn't sort them properly. The numbers are just all over the place, and I'm not sure I'm seeing any pattern of why is it so. Also I've tried both . and , - doesn't matter. Do I really have to make some kind of workaround for this or am I missing something?

  • A quick buck gig for anyone skilled/interested. An area where the player moves and fights the eneimes, but the key here is enemy behaviour. Just a simple example with every behavior state fully functional. Might take anywhere from a couple of hours to a day or two, depending on the skill and free time allocated, of course).

    I'm not going to go full-in on the details here, but the basic rundown is as follows:

    -Top-down roguelike styled game

    -32x32 grid

    -A moderate number of instance variables

    -Multiple enemy types and behaviors (might include Pathfinding or whatever suits you best) reacting to the player

    -Some visual additions

    -Making sure all the logic is functional of course

    No rush needed to get it done.

    Anyone interested can contact me via mail at kroftek@gmail.com and I'll hand out the full job description, and from there on we'll see if we can strike a deal.

    I'm not sure about the cost of this so I'll communicate this with the interested party before/during the process.

  • I think I've figured it out, it seems to work using families and instance variables. Thanks for the reply.

  • I was wondering is it somehow possible to have, say 20 arrays with the same structure, and then in any moment name a global variable after one of the arrays, and then manipulate that specific array? And if it isn't, why not? :D

    My opinion is that, at least for a project with a pretty big database, it's better to have cca. 50 arrays with 500 elements, rather than a single one with 25000 elements. (not sure about C3's performance array-wise though).

  • Greetings, I need some help with the card game I'm trying to make. The player has up to 10 cards in his hand, and they are displayed in such manner that they are slightly overlapping from right to left (think of games such as Hearthstone or Slay the Spire etc). When the player hovers the cursor over a card, it stands out from the rest. Its size is slightly increased, and it is placed on top of the layer so it can be seen clearly. When it's not above the card (else), the size resets back, however I can't figure out how to bring the card back to its original Z-order. Whatever I do, the card just stands out from the rest.

    Any ideas?

  • I'm making a football simulation program, or at least trying to. I have a main data array where the team stats are, and then I load that data into a side array to sort/reverse the data to be appropriately displayed according to ranking, etc. (it's being sorted by the X axis)....however, the array is 3D - there are 4 groups, and each group takes one Z sheet; for instance group 1 is Z0, group 2 is Z1...the issue is that sorting only sorts the first Z sheet. Am I missing something here, can I sort the X axis on every Z sheet?

  • Man, C3 sometimes really is full of surprises. How come I overlooked this one? Thanks for the heads up.