ome6a1717's Forum Posts

  • oosyrag - I tried playing with the HTML properties for the textbox. I've gotten some things hidden with the CSS lines, but honestly it's too much of a hassle to make it work.

    Sumyjkl - Yeah, that's pretty much what I ended up doing. Kind of a pain, but I suppose it works.

    The only thing I wish made sense the arrow keys returning a unicode symbol instead of text...

    Thanks for the advice!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sumyjkl

    I thought of that, but then if they happen to right click it, the menu will pop up and break the immersion of the game.

  • I've been able to make my own text input using keycodes and StringFromLastKeycode with the keyboard object, but I'm starting to run into issues with characters that have modifiers (like shift + 1 = "!", or shift + "/" = "?"). If I hold shift, it still returns "/" instead of "?". I also have issues with the down arrows (it actually returns an arrow instead of "up arrow", but due to it being a spritefont, just returns nothing).

    I'd really like to not have to bother with a text input object. It's a pixel art game at a very low scale and a textobject will ruin the way it looks. Is there anyway to do that with keycodes short of coding every single key individually?

  • nacra - Good idea! Total pain, and unfortunately I have to still keep that button there, but other than that, it seemed to have fix it. Thanks!

  • Just bumping this - does anyone know if I could at least change the initial value of the Boolean?

  • Taximan - correct, but I wish to use the same sprite to save on memory and make my code more simple to use.

  • WackyToaster - thank you!

  • When you create a sprite, you can set instance variables to that sprite. However, once you make a copy of it (not clone it), if you change the variables of THAT copy, and then create the sprite via code, it has all of the variables of the first ever created sprite.

    Is there a way to determine which sprite is the "first created" so if I need variables to be a certain way upon creation, I can change them?

    The reason for my asking is that I've created a button sprite and do an "on created" > if Button Boolean = True, create Text overlay for button. However, if I create the button and set the boolean to false in the same event, it somehow grabs the on created segment of the code before it can be disabled.

  • Just curious - is there a way to find the save file when using System > Save in node webkit?

  • - right, that's why I thought. That's why I assumed if I put everything in both comparisons to a str() format, it would work, but it didn't. It wasn't until I set the variables it was checking (which were ints) to a string local variable and THEN checked against them.

    - correct - that's how I've done it in the past. Basically I was doing:

    if ("5-6-Tree") = str(x) & "-" & str(y) & "-" & "Tree"

    CALL FUNCTION

    This or doing str(x & "-" & y & "-Tree") didn't ever call the function.

    It could be that maybe it was a mistake on my end, but I've noticed more and more things not working when I feel like in the past they would have without me doing that. All in all, it's probably good practice to do it that way, regardless.

  • - correct, but if I'm setting a dictionary key to "4-5-Tree", then what is each part? A string or an integer?

  • Has anyone been having trouble with int() and str() comparisons? Lately, if I tried testing to see if a string var that is preset to -1, do <this> function. But it would never work, even though it CLEARLY said -1. I had to put str() around it, even though the variable itself was a string and not a number.

    I've also had to do this with strings that I use tokenat for (ie. I set a dict key to 4-5-Tree (4-5 being tile positions) for a tree tile location, but if I were to check if "4-5-Tree" = that exact key, it doesn't work (even though if I add both to a text, it is the EXACT same). I end up have to create 2 local variables that are integers, and check x & "-" & y "-" & "Tree".

    This probably doesn't make too much sense, and maybe it has always been this way, but I feel like I never noticed it as much as I do now.

  • Understood! Thank you!!

  • I've quickly tested my game during a few different alpha versions of the new runtime to see what happens. The last stable patch, the game ran fine, but once I moved with 8dir, the game would just crash. Now in this current stable patch, I can move around without it crashing, but certain elements of the game are just straight up broken and don't work.

    So my question to Ashley is:

    1. Being that the runtime is a complete rewrite, is there any code that would be deleted by switching from the c2 to c3 runtime (in other words, if you have a static variable and use that static variable, deleting it will also delete the events that utilize it; does something like that happen with the runtime?)

    2. I understand it's not fully released yet, and could potentially be a bug, but is there any typical construct coding practices that will no longer work, or will need to be changed/thought of differently?

    I think the C3 runtime will be immensely useful in our game, but I want to make sure there's nothing obvious I'm doing incorrectly before I spend a lot of time debugging to see what's not working.

  • Just to add here, we actually did an application for Steam, too.

    store.steampowered.com/app/579920/Swatcher

    Doesn't have to be a mobile game! It's very doable, especially if you're comfortable in the Scirra world. There are certainly limitations to it depending on what you're trying to achieve, but worth a shot if you plan it out right from the beginning.