Radiowaves's Forum Posts

  • Here is a test project file set up as in example:

    drive.google.com/file/d/1ZA73lkadR781hUufXNhE52ySyu1MP7tt/view

    What is wrong with it?

  • When trying to call functions inside expressions, I often get "this parameter does not take a number" although the parameter is a single digit stored in a variable that is parsed from string (removed surrounding characters). There is also no "any" parameter type on functions. I need to convert numbers into strings and back, then do maths with those numbers.

  • I have this loop, but CurX and CurY do not update and stay with value "2". Count variable is updated.

    "TileMapper" array size is 12x12, loop is 8x8 times. I have function inside expression which runs another loop, it does its thing but it only prints on the first iteration, then it stops printing (but it still works).

    I re-typed the "CurX" value (100% same text) and it started working, but the mentioned function inside expression behaves the same. It also behaves unpredictable when I move the contents into parent.

    Is it a bug?

    How should I set this up, what am I doing wrong?

    EDIT: Appareantly my image keeps dissapearing from this post also.

  • You do not have permission to view this post

  • I ended up doing it like this:

    Problem with arrays is that all the rows/columns etc need to be the same length, which makes it harder to count values etc. Next problem is that it is just cumbersome to make in C3, as it is separate object, needs either duplicate or some ID to reference it, but ideally it could act as variables/strings do, so that temporary arrays could be created locally. No dimensions besides 3 either.

  • I write this return value in an array for further processing where I check for each token and draw a tile in tilemap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a string like this: _0_1_0_1/_1_1_1_1/_0_1_0_1/...

    I want to return duplicate between "/" and pick a random one if many different duplicates occur.

    I would not use strings if lists were possible in C3.

  • Yes the simple solution you kind of began then went for overlap checks. It's all about data and the gen ID is all you need. If the gen is down, you find all cables that have the gen ID and they are inactive. They are linked with IDs for this purpose, no need for checking overlap of objects.

    Brilliant.

    But what if one relay is getting power from multiple generators?

  • I would set variable/boolean "hasPower" for each Cable, Relay and Generator.

    Generator would have power set 1 by default.

    If Cable overlaps Generator & Generator hasPower==1, set Cable hasPower 1.

    If Cable overlaps Relay & Cable hasPower==1 & Relay hasPower==0, set Relay hasPower 1.

    If Cable overlaps Relay & Cable hasPower==0 & Relay hasPower==1, set Cable hasPower 1.

    Things get problematic when you want to add shorts:

    If Cable overlaps Relay & Cable hasPower==1 & Relay hasPower==1, run function "ElectricShort".

    This would be set immeadetly when unpowered Cable is overlapping with powered Relay. To tackle this, power cable could be split in two + & - side and check for those instead.

    If you do not want to run this all the time, put it into function and set it for each Cable.

    But in this case the function has to run from cable starting from generator first!

    Haven't tested it, but this is how I would start making it.

  • Yes, crop is what I want, certain UI elements responsive & pinned to corners.

    I already tried layer scales, It messes up my calculations.

  • You do not have permission to view this post

  • This leaves a black box, and also zooms in/out. This is default setting for pixel art, but it is no way ideal.

    I would assume viewport could be flexible without scaling, but no, not in construct 3....

  • I am dealing with pixel art, and pixel perfect movement, so I need those pixels. Somehow I do not get the game to full screen. All the scaling methods just seem to zoom when I change window size, even those that seem to be responsive. I want the zoom level to be the same no matter the viewport size, I do not care if the screenspace gets small.

  • You do not have permission to view this post

  • Okay, I found a solution.

    Unzip the c3p file, replace items, repack and upload.

    Somehow this was not obvious to me, that c3p files can be unzipped.