helena's Forum Posts

  • Hello!

    I am working on the input, and I don't like the looks of the text box (1. it is html 2. it won't use spritefont)

    so I want to build my own.

    Now I am on a problem:

    To intercept keyboard input we use keycode, and keycode to string.

    Ok!

    But.. Not everyone have same keycode for some of the special characters. For example to get $ I have to press Alt Gr + 4 (on Nordic keyboard), but for an American user they just need to press Shift and 4.

    There's many more of those examples, even with simpler characters such as * ? and so on.

    How do I do in this case?

  • Ok now it works. I must have put the events in wrong place before.

    Thanks folks!

  • I managed to get what you meant now!

    At first I was so confused, and I had to reinpret it a bit.

    On the time I had to add a boolean to be true, and then add that boolean in the spam version.

    And mouse click end = setting boolean false.

    Hopefully it will work now!

  • Looks like the second pix fell away. Wasn't able to add it back in.

  • I have this.

    These two are identical, but one is mouse down.

    What I want it to do is let individual clicks pass, but also let pressing down mousebutton work, after a tiny while, long enough for the user to presumtive click and release mouse button for individual input? (or a tiny bit longer)

    With having both events going on, the mousedown of course kicks in at once.

    I hope I am able to explain what I want.

    For context: it is to adjust a number in gui. Pressing down button will spam and do it uncontrollable way, while single clicks is tedious if you want to adjust from let's say 0 to 60.

    Here's a pic to show what I mean.

    Thank you!!

  • Hello.

    What title says.

    I know this seem simple but won't work for me by some reasons.

    I tried to use variable to keep track of "key is down, key is pressed".

    So I was wondering if anyone have done a elegant solution for these needs?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can answer: I forgot I had a content clearing routine going on.

    Answer: No it will not clear content.

  • Hello!

    If I do

    Tilemap Set Size to (new size in W and H)

    It will always result in empty tilesize, and the pre-existing content will be deleted?

    This is just a question to make sure that this is the correct way above event will behave.

    If yes, then I will need to move to temporary array. I know how to do it, I just wanted to be sure.

  • Late reply, but I wanted to tell that I used your example (with my own modifications) and it is working beautifully.

    Thanks again!

  • Thank you for writing this for people in need.

  • Thank you for clear answer.

    I already went with loops as described and it works nicely. It is just a couple lines more, so it is ok!

  • Hello.

    I have a quick question.

    It is easy to load over from one array to other by using the load as json.

    I tried to load an array with the data from one tilemap using similar method. But it didn't work in my project.

    Is it simply two different formats and I have to manually transfer the data in loops or did I do wrong?

    I did this:

    ARRAY load from JSON string (tilemap.json)

  • Thank you!

    I have added that "quitter" when I got fed up with trying to shut down browsers from task manager for 50th time like.

    Your example looks neat and looks like it works properly. I will try to use that toward my needs.

    Thank you so much again, as always.

    (and I am very much considering going over to a properly tilemap for this... I couldn't use it for game engine iself, but for level editor it will work. Lots of rewriting ahead, but it might be for the better!)

  • Hello.

    I added a flood fill function to my level editor.

    I found it here on the forums.

    construct.net/en/forum/construct-2/how-do-i-18/best-flood-fill-tilemap-141678

    I tried to adapt it to my editor. (it functions a little different)

    I managed to go a bit, ironing out a lot of bugs/glitches/getting stuck.

    But I am having a bit of glitches.

    If you draw small boundaries or figures and try to flood fill them (try several times!) it will sometimes be stubborn and NOT floodfill it, until you found a sweet spot and it manages to fill.

    Sometimes it will flood fill but in WRONG boundary area!

    I have to be honest, I don't play well with that kind of array manipulation. I prefer fixed array, setting values, ha ha!

    But it might be a problem elsewhere. I am confused why the original code only needed X coordinate and not Y (for the inital push)

    Capx file is here:

    funnybunny.se/files/bugwithff.capx

    And just to take a glance of the editor in action here's the uploaded version.

    funnybunny.se/files/project

    Again, I have tried to clean the code as much as I could. Let me know if I forgot third party plugin.

    Thank you and I hope you can help me.

    Also if you feel helpful, maybe also give advice to work in that i won't touch the boundary tiles (1tile border)

  • I managed to make it move incrementally by doing

    DragDrop is enabled: set position round(object.x/cellsize)*cellsize and same for y.

    And add clamp to constraint to one area.