Pandito's Recent Forum Activity

  • Wow, just, thanks again, I'm so happy haha

  • Instead of using a real Textbox, you can use a text object acting like a textbox

    https://goo.gl/kiuyUo

    Thanks, I'll take a look into it! Since the game is reaaaally based on text, I'm very opened to different solutions that offer more flexibility!

  • Try Construct 3

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

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

    textBoxArrows.capx

    Oh my god, I literally copy pasted your javascript into my project, renamed 2-3 things to match it and it straight up WORKED! Thank you so much, and frankly I'm amazed and very thankful that you'd take the time to make an actual capx for it and all! #stoked!

  • Um, I could upload a CAPX ... But do you actually understand? I'd rather not upload the capx unless I have to.

    The only thing I want to do is find a way to detect the "Up key is pressed" and "Down key is pressed" despite the textbox being focused.

  • Hello gamecorps! What I'm trying to accomplish is ... ugh, okay, this might be a little hard to explain lol, apologies in advance.

    So I'm making a text-based platformer, where you have to type in commands such as "right" "jump" etc to get by. To do so, I use a text box that is always focused, and I detect the "Press key 'Enter'" to check the text and call the right functions.

    Now, what I'm trying to make is a kind of "Chat History States", which would allow you to press the Up key to scroll back into past commands that you've sent (those "Chat history states" are stored in an array, and they appear in the active text box as you scroll through them with the arrows).

    My code for the scrolling is functionnal, but the arrow keys press CANNOT be detected WHILE the text box is focused.

  • Sh*t, I ran some tests, and actually, even with Javascript I can't seem to know how to go around it ... my original test used the Control key in conjunction with Enter, but I now realize that basically only Enter gets detected??

  • So, by default, events like "Up key is pressed" are not triggered while you have a Text bot selected. Ashley mentionned the reasonning behind it "This is by design, to prevent text input conflicting with game input.", in this post . I understand that, it's reasonnable. BUT, is there a (preferably simple hehe) way to situationally bypass it?

    I remember doing it before by hacking into the actual exported C2 javascript files T__T but you have to do that every time you export a new version.

    Any other, simpler solutions though?

  • Is there any way to easily bypass that though? I remember doing it before by hacking into the actual exported C2 javascript files T__T but you have to do that every time you export a new version.

    I guess making a plugin would work too ...

    Anything easier though?

  • Thanks a lot for helping out guys! I think we're good now, thank you Construct 2 community ;D

  • Mark? Please send me your email so we can communicate even when we're not both on skype at the same time!!

  • Email sent!

  • Hey, Xoi San looks pretty cool! Sure hope it gets greenlit, I just voted!

    Totally interested by your offer btw! Sent you an email

Pandito's avatar

Pandito

Member since 18 May, 2013

None one is following Pandito yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies