Maukka's Forum Posts

  • Now that this supports even inserting images it's almost perfect as far I'm concerned but one small issue I have is that to do tooltips for certain words I would need to get start and end coordinates of a word within a string and while I probably can do that by doing stuff like setting another instance of a TagText to just one line of text ending at the word I want and getting TextHeight and TextWidth for that but it would be a lot less trouble and possibly faster if there was a expression to find X or Y of a word, something like system.find expression but for coordinates instead of index and with parameters to get either start or end of the text.

  • You could use pin behavior to make them move together or move each of them same way with something like pick by evaluate or pick by comparsion.

    Not sure how to do smoothly such a specific distance.

    CustomMovement behavior might be useful if you can do some math and figure out how much and how long you need to accelerate and decelerate to move 20 pixels more smoothly than just at constant speed.

  • Another way might be to change the array value after picking it(you could add another z level if you for some reason can't change current values) so that you can check it when picking and repick if it it picked a already set value.

  • I was thinking it'd be nice to add some amount of support for using multiple monitors but I'm not sure how I should go about it.

    Mainly I want to show various stats and such that would otherwise take too much space to be shown all the time in another window.

    Just running the game again on another tab and using local storage to save relevant stuff seems to work but having the game loaded twice(or more) probably isn't very good for performance.

    Doing another project that has only the things I want on a 2nd screen would probably be better but I have no idea how I could get them to communicate the stats I want between them since I assume I can't use local storage values of another project.

    Are there any other ways it could work?

  • Hmm I'm not sure I understand what you are asking.

    [quote:1q0lh9on]and then add that with array.speed in a X,Y coor

    based on that are you are asking how to add the array value in a another expression? If so

    something+array.at(array.IndexOf(name),array.speed) might be what you want.

    Also I'm not sure but as far as I can tell it might be better to use X for names and Y for stats because some stuff seems to be either for just X or X and Y but not for just Y.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For large arrays like unit lists and such I use instance variables for stat positions on an axis so I don't need to remember stuff like if I had health as 12th or 13th item and can just use array.hp in place of it.

    But for using the name maybe IndexOf(name) could work if names are unique.

  • Hmm there are tons of ways to do it. Not sure how to explain how to do procedural walls, just add some condition for createObject action though not using createObject would probably be better for performance if you can think of a way to do it like reusing "old" objects.

    I would probably just have set of wall pieces moving left that I'd randomly teleport beyond the right edge or something like that.

    Or you could have few instances of one wall object that you rotate and move around.

  • https://dl.dropboxusercontent.com/u/6026058/project.capx Added Tower 1 beyond the top left corner of screen. Is it meant for Tower 1 to spawn on the left edge of the screen? If not you should change the createObject CanDo.UID to something like CanDo.X.

  • Since you want it to carry over layouts, a global variable that you set when object count of the enemies gets to what you want seems like the easiest option.

    Doing it as Gearworkdragon suggests will save you from cluttering the project with too many global variables(all of them being listed whenever you add a system expression and such can be slightly annoying) but you need to make sure that the object is set to global so that it'll carry over.

  • You need to place the Tower1 object somewhere, it's fine if it's outside the play area as long as it's somewhere where you can change the size of it and set instance variables and so on.

    Instance basically means a copy of a object so if you have 2 tower1s one will be instance 1 and other instance 2

  • Read the error message? You need to have at least 1 instance of the drop in a layout for construct 2 to know what it should be like.

  • Sort it, it'll do it alphabetically, if you want to keep it in pickup order or some other you'll need another field(more height) to keep track of it.

    Sorting X will use (X,0) to sort it, if you want to sort by quantity or something else you can do some stuff to have it temporarily be at (X,0)

    Also you could do a "for each X element" loop that checks for 0 and after it set every non 0 entry to be curX-1 but I find that more annoying to do.

  • One way at least is to add a non transparent layer with black background above all the others but with 0 opacity and when you want to fade to black increase the opacity at whatever rate you want through the Set layer opacity system action.

  • Height is 2 because you want to store the item name and amount of items separately, (you could have them as one but you'd have to turn the amount back into number to add to it ie. int(right("berry x 3", 2)) and... anyway you want 2 columns)

    CurX, CurY and CurValue are current thing in a for each loop. You see them if you look at expressions that an array has.

    Also if you run in debug mode and select the array you can look at how it stores the data. it should show something like

    (Berry, 3)

    (Pokeball, 6)

    (0,0)

    (0,0)

    and so on, it might help with visualizing how the array works and such.

    As an aside if you didn't want a inventory limit you could use 0 width array and a push action to increase the size of the array whenever you add items

  • What I meant with compare frame was that you could skip doing multiple animations by checking for the frame at which you want to change speed and changing it back to normal at a later frame.

    And wow, there is indeed frame speed for each frame.