iKiwed's Forum Posts

  • > "Compare touch speed" and "compare touch orientation".

    This is possible with expressions - Touch.SpeedAt(0) and Touch.AngleAt(0)

    This should be enough for simple swipe gesture recognition, but you might also want to compare touch start and end time - to check that it was a short gesture.

    https://www.dropbox.com/s/gk6xktdvn0p9cn0/SwipeControls.c3p?dl=0

    You are a life saver as usual!

    Yes, I've also made sure that triggers only once, else for the game it's like if I'm swiping forever ahah.

    Thank you a lot.

  • Hi friends. It's been a while, but I'm here again.

    I'm making a new project. This time for mobile. And I'd like to end this project, possibly.

    Since it's meant for mobile, I'm trying to include the touch controls.

    While I'm ok with the choices selected by Construct, and I love making buttons to be pressed, I noticed I haven't found much about swiping.

    In my game, the character can change in 4 direction: Left, Right, Up and Down.

    So, if the player wants to go up, they should swipe vertically from botton to the top. Or, if the player wants to go to the left, they swipes horizontally from right to the left.

    I'm not the best in coding and all, but logically, I imagine it has to do with the orientation of the swipe. Something like "Compare touch speed" and "compare touch orientation".

    All the tutorials I've found are old or extremely long, like if such feature is not that possible.

    If it's not too much to ask, do you know how I can solve this task?

    Thank you for reading and your help, have a good day!

    Tagged:

  • In my demo I only change player's position, this should not affect z-ordering in any way.

    Are you spawning a new player on start of each layout? Check that your player sprite is not set as Global. If this doesn't help, there must be some other mistake in your code, please share your project file.

    Awkward, about 1 hour after I sent my message I updated it just by saying that I did indeed solved it again in the same way I solved the other issue - and yes, it's just as you said, the player was set to global. Not sure if you can see the edited message.

    Again, thank you very much for your help! I guess I cleaned up a bit some events and I believe it's going perfectly now.

  • Hi there. Sorry for the late response.

    Thank you all for your support, you're incredible!

    Yes, dop2000, the link you sent is what I'm referring to.

    I've played the demo and watched the event section, and it's exactly what I want to replicate in my game. I had to change some things for the movement due to the issue with the direction. Other than that, it's 100% working.

    Also thank you for all for the links, I'll give a look now. Now I want to make a simple fade in/out transition.

    I'm sorry for reopening the subject. I seem to have an issue with the Z order. I'm not sure yet. So I've followed dop2000's guide and the teleport works fine.

    Now I've noticed that, if I use two teleports, one in layout A and one in Layout B, and frequently change layout, I see the player decreasing its Z Index of 2 positions until a certain number. So I see the player going behind the background or some objects.

    I've also noticed that, when the player spawns in another layout, there are actually two player sprites. The original one, which you can see, and another one, which is apparently invisible.

    EDIT: Nevermind, fixed in the same way I fixed last time.

    Basically, the player was set to global.

    Turn it off if you have it, else you get copies of the player.

  • > huh I've never used Github

    You don't have to use github, there's just a form you need to fill to log a bug report.

    Oh my goodness, I solved it.

    It all began with me making the demo as essential as possible.

    By removing objects, all remained was the textbox, the custom font and the text.

    I wanted to keep things as simple as possible, so I renamed the font name just "customfont", and surprisly it works perfectly.

    I tried on the original project, and now it's working as intended, with and without manual wrap in the sentence.

    What can I say... Wow.

    Apparently Construct on Firefox doesn't like underscores and extra dots in font names (the original name was VCR_OSD_MONO_1.00.1.ttf).

    I guess case closed?

    Thank you so much for your help, really.

    Actually, if it wasn't for you suggesting me to send the project as debug, reading the rules, modify the project to make it as essential as possible, by leaving only the interested objects, I would have never found the issue.

  • Yes, I used Chrome. Tried in Firefox and the text shrinks there! Must be a bug. If you can reproduce it in a small demo project, you can log a bug report:

    https://github.com/Scirra/Construct-3-bugs/issues

    I see...huh I've never used Github, but I'll try to figure out.

    So, does it mean I have to move on Chrome? Not exactly my favorite browser...

    But ok. Until then, thank you so much for your help (also following some of your tutorials on your website, really cool).

  • I tried your project and it works fine, the text doesn't shrink like on your video.

    ...I don't get it. Is it a browser issue? I use Firefox... Altough, I doubt this is the problem, isn't it?

    Or is it? I used a web engine once, for a sort of visual novel game, and I remember playing the game on Firefox and Chrome, and they had for some reasons different results. Do you use Chrome, perphaps?

  • I have never seen anything like on your video. Are you sure there are no other events that can change text appearance, for example when typewriter is finished? Can you share your project file?

    Ah, yes, sure.

    https://drive.google.com/file/d/1NyranNJIcrYcKrPy_p6OOMj3KwY8PhHH/view?usp=sharing

    I've added the textbox in the second layout, so if you want to see it, go there. By pressing "I", you should see the textbox showing up and then the text.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want to manually add line breaks, you can use some symbol, for example #:

    Variable myText = "The quick brown fox#jumps over the lazy dog."

    Then before typewriting do:

    Set myText to replace(myText, "#", newline)

    I see, thank you, it works fine.

    However the issue still remains. Even with the manual wrap, there is still issue of the text streching like in the video I posted.

    I feel like it has to do with how the game loads the text in the layout. Is it possible?

  • Hi guys, it's me again. So I've my text with typewriter which is nice, but something doesn't seem to work. The sentence doesn't wrap properly.

    Honestly I could do it manually, if necessary. If I'm not mistaken in C++ you can do something like \n or /n, I don't remember exactly. But anyway, if I have to type the text in a global variable (idText in my events), I can't manually wrap the sentence. Personally, either manual or automatic is fine, as long as it works.

    So basically what I got is basically this, in the video below, from point 0:00 to 0:09.

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

    However, I've noticed something. If I'm in that layout, and I've reproduced the typwriter, then reload the layout (I've made a pressing button for that) and do that again, the wrap works perfectly.

    How, I wonder?

    Here, here's a screenshot of the events.

    Thank you so much.

    (I'm sorry for being dumb, I have looked at JSON and Laura's teaching plus the demos but I admit I have half a clue of what happenes in the event section. I've looked at Mozilla's documentation which brings me to another website for CSS which brings me to another website for HTML, so I feel like I'm either too far to make something or... I don't know.)

  • You can check Lauras tutorial.

    https://www.construct.net/en/tutorials/branching-dialogue-using-json-2395

    Alright, thank you so much.

  • Hello , sorry for the late answer.

    What do you mean by multiple scripts with out using only the events?

    What are you trying to do and you can not with out the events?

    Sorry I didn't say it correctly.

    I'm trying to figure out how to do the rest of the dialogue system - JSON (if necessary) and all, so I'm not sure if there is a "best way" or a "simple way" to do this on Construct.

  • If you have store in a variable the text you want to typewrite you can use len(variable).

    Oh my judge you're a genius. I don't even know what I did, but I did it and it's working great!

    My only two concerns is that it works only if the variables duration and character amount are global. Other that that, it's great.

    Now I have to find out how to make multiple scripts without using only the events. What did you use for your project?

  • Im currently using one method in a project right now, i dont know if is the correct method to do that but here it is.

    SpriteFont is running typewritter text

    Every "duration / 1.6" / character ammount -> play sound

    Seems to be the answer, but... how di dyou get the character ammount?

  • Hi there. So since the last time we met I bought an annual subscription of Construct 3, so I guess you're going to support me (and bear with me) along the way, haha.

    So I'm making a short dialogue function, and I got how activate the typewrite effect. However I wonder if it's possible to synchronize the each letter appearing with a sound effect. I know I can use the "wait for X seconds" in the System, but if the text may not be synchronized if it's too long or too short.

    Thank you so much for reading.