neutrinox's Forum Posts

  • If this is not possible, I welcome that information as well!

  • Hi!

    Construct doesn't seem to be capable of regognizing specific key presses when the textbox-window is active. I'm trying to unfocus the textbox when the player wants to move forward by pressing the arrow keys, but it's not working -the textbox still has the focus. I also tried to use the browser object (because it has a blur command) but I was unsuccesfull with that approachh as well. To be clear, I would like the game to get the focus when the player presses one of the arrow keys (instead of the textbox), because when the textbox has the focus the player is stuck and can't move.

    There must be some way to defocus/blur the textbox without having to use the mouse! Any ideas are welcome!

  • I got the same message after upgrading from 190 to 195. Backup-file gives this message as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi! Sorry for the late reply! I ended up separating all my dialogue lines with pipes and made one event sheet just for this text. Then I simply created one global variable and pasted it all in. I'm later looping trough the sentences by using the pipe as the splitter and each line starts with a number so that I can easily call for the right position.

  • Hi!

    I'm trying to detect when a player stops overlapping another object.

    The problem with writing a condition that simply says "player is not overlapping object" is that it triggers also in the very beginning.

    Is there a way to write the condition so that it only triggers if the player was just before overlapping the object?

  • Your way worked nicely! I ended up storing the original array in a temp array though, because in this particular example I needed to alter the order of the array only for the top-list and then revert it back. Thanks for your help!

  • Thanks codah, I didn't realize that because I apparently only checked the example from the thread you linked. I'll try your system now!

  • Hi!

    You are right, I expressed myself incorrectly when I was talking about storing values in the x-axis. I should have said "y0" instead.

    I think I will still experiment in doing a quick y-order swap before doing the sorting, just because my project has been built to depend on the names being on y0 and I would need to find and replace many parts of my project.

    I guess I can just build something like this (pseudo code), perhaps inside a fuction:

    on Function "ySwap"

    For each item at y0, store them in a temporary array at y0. For each item at y1 store them in a temporary array at y1. For each item at temporary array y0, store them at real array y1. For each item at temporary array y1 store them at real array y0. Then do the sorting and put the names in place. Finally run the function again.

    I think I will give that a try because my project is so complicated and I'm scare of messing it up if I start changing the older logic in which names are at y0.

  • Hmmm... maybe there is a way, even if the values to be sorted are not on the y0-axis.. What if you temporarily switch y-rows so that the row you need to sort is y0... I'm sot sure if such a switch is possible, but I think that would solve the problem!

  • Thanks for your replies!

    Do you understand what actually happens when I sort the array Y-axis? Oh maybe I actually get it now, is it like this:

    Before sorting Y:

    y0 values: a, b, c, d, e, f

    y1 values: 1, 2, 3, 4, 5

    y2 values: 6, 7, 8, 9, 10

    After Sorting Y:

    y0 values: 1, 2, 3, 4, 5

    y1 values: 6, 7, 8, 9, 10

    y2 values: a, b, c, d, e, f

    In other words, is the sorting vertical? Is there no way to sort the Y-axis horizontally?

  • Hi!

    I'm trying to make a "top three" list for my game.

    During the game, I store points in a 2d-array. The X-dimension has the player name stored. The Y-dimension stores the points.

    When the player goes to the highScore layout, I'm want to display a top three list in which the player with the highest score is first, then comes the player with the second highest score and so on.

    My tactic (which doesn't seem to work) was to sort the array based on it's Y axis and then reverse it so that the order is descending. I'm not sure if I understand correclty how sorting works though. If I have an array like this:

    [john,2][mike,5][tom,1]

    and I sort it and then reverse it on the Y-axis, shouldn't the result be:

    [mike,5][john,2][tom,1]

    Or is that not how sorting works?

    My next step after sorting and reversing is to do a for-each loop for the array in which I fill the top three text slots in the order of the array. But this concept doesn't seem to work because all the names will be in their original order, not in the order I thought I achieved by sorting them.

  • Do I dare to bump this? If the answer is "you have to ransack each layout manually" then I appreciate hearing that too!

  • Hi!

    I have several layouts and I know I have a certain object somewhere in one of them. I can find the object in the project panel. But is there a good way to find out which layouts contain that object without manually opening and checking each layout?

  • Wow, brunopalermo, that's a very elegant solution! So much simpler than the crazy clusterf*ck I had going on

    Thank you very much for such a beautiful solution!

  • brunopalermo I appreaciate your voice of sanity. However, the very first thing I tried was using a single text box for everything, but for reasons I don't remember very well anymore, it couldn't achieve what I needed with just that. One thing that I know for sure was that I couldn't color the individual sentences inside the text box (at least without external plugins). It would be nice if one could use something like html-tags inside the text area to mark different texts for different treatment, but I don't think that's possible. Do you know of a way to color the individual sentences inside a single text area?

    But maybe you're right and I should "kill my darlings" (meaning coloring the sentences based on the character speaking), I think I will do some more testing with that approach too. It's just that my admittedly more complicated setup is finally working pretty well, the only detail is the "scroll handle" size, which I'm fairly confident can be solved. I'm also a bit worried about having something like 1000 sentences of text in a layout. Currently there is only about 6 text objects (sentences) at any one moment. It would indeed be interesting to know which way is better for performance (or if there is any effect what so ever). So far I have been getting pretty solid 60fps in that layout on my desktop computer.

    LittleStain

    It's the adding actions part that is the question mark. I can indeed detect when something should be done (based on the y-position), but I'm not sure what the right action would be. I now have the image point at the top of the scroller, so scaling the object won't help with the upper part of the screen.

    Maybe it might be possible to dynamically create another scroll handle object when needed and pin the old one to it. This way it might be possible to keep scrolling with the newly created scroll handle and the old one would follow it. I might give that a try.

    EDIT:

    I think there would be a very easy solution to this, if the image point used for scaling could be changed dynamically. But that's not possible I assume?