neutrinox's Forum Posts

  • Hmmm can't seem to figure that one out..

    Here's the structure with which I'm trying to follow your suggestion:

    -Touch on touched textUniversal

    --textUniversal text is "Reset game" -->system -wait 1 seconds

    ----------------------------------------------------->textUniversal -set text to "resetting"

    ----------------------------------------------------->system -go to firstLayout

    With this structure the text no longer changes, but the system doesn't change layouts either. I also tried other arrangements of events and subevents but so far I haven't come up with the right cocktail :/

  • Hi!

    Is it possible to have a subevent run it's course even after the triggering parent event is no longer true?

    I'm asking because have gotten myself into a situation like this:

    When a player clicks on the "reset game" text, I check that the text of the text object is indeed "reset game" (because I use one universal text object for all texts).

    However, before actually resetting, I would like to change the text to "Resetting..." in a subevent to indicate a change (so that the player gets visual feedback that the click registered).

    The problem is that now the parent event condition is no longer true (text is no longer "reset game" but instead "resetting") and it seems like also the child event stops executing additional steps.

    I know there would be other ways to solve this, but I'm interested in understanding Construct better. So is there any way of changing the text while still keeping the subevent running?

  • You need to stretch the main window so that it spans both monitors. You can stretch it if you first click on the little rectangle in the top right corner of the program.

  • I'm not sure if I understand.. I would not like to change my window layout, I would just like to understand how Construct decides where a new layout or even sheet should open. My current layout spans two monitors and is setup like this (from left to right):

    Monitor 1:

    -properties panel

    -big window for layouts

    Monitor 2:

    -layers panel

    -big window for event sheets

    -projects panel

    -objects panel

    Again, I'm very happy with that setup, but when I open layouts from the projects-panel, they open inside the projects panel (I would like them to open in one of the big windows instead).

  • This is a question about the Construct UI:

    How does Construct decide where opens the event sheet or layout when I double click to open it inside the projects-panel? At the moment Construct is opening all event sheets inside a very small window which is very frustrating for me. Is there any way I can make construct open event sheets in the same UI window where my other event sheets are open?

  • Just in case this helps someone else searching for this information, here's the expression I ended up using for my HUD:

    set text to "= " & left(str(money*100), len(str(money*100))-2) & "." & right(str(money*100), 2)

    There is one small weakness with this method: if the number is zero then there will be no decimals. But that one exception can be easily taken care of with an if-statement.

    EDIT: Actually there is the problem that if the original value is less than one (for example a decimal like 0.50) then we only get a number with two digits and the above expression stops working. I need to research this a bit more.

  • Thank you very much Paulscottrobson, that sounds like simple way of handling it!

  • Hi!

    I'm trying to have a currency system with two decimals in my game. How can I make the heads up display always show the two decimals, even when the value happens to be a round number? In other words my problem is that round values like two are displaying as 2 $ instead of 2.00 $. I tried to search but couldn't really find anything on this subject. Any help would be appreciated!

  • Thank you, this seems to work! And I learned about Wait 0, which seems very useful!

  • Try Construct 3

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

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

    I'm developing an RPG and the dialogue texts vary greatly in length. Has anyone a suggestion of a good way of automatically assigning a background color for dynamically created text objects? My problem seems to be that I need to wait something like 0.1 seconds after creating the text object before Construct will calculate it's size correctly (for sizing the background rectangle accordingly). This slight delay gives the game a glitchy feel. It would be great if we simply had a text-background property, but in the absence of that how would you create text backgrounds for dynamic text?

  • Hi!

    I have been trying to think of a simple way of overcoming the webstorage/cookies limitation of the player having to use the same computer every time for the game. I would like to create a system in which the player can pick up the game on any computer.

    I was thinking of storing all the different game variables in a string, then somehow obscuring that string and giving it to the player when he quits. So all the player would need to do is save that string and next time he could use it to restore the game progress. Can you give me your thoughts on such a system? Has anyone tried anything similar?

    To give you a better picture of what I'm thinking about, here is a small example:

    Data to be saved:

    1. Checkpoint number (as a hex-number) 1-16, this determines where the player is positioned, needs one character from the string

    2. Health amount (as a number) 1-9, max health in my game is 9, needs one character from the string

    3. HP amount (as a hex-number) 0-256, needs two characters from the string

    4. Completed tasks, this one is tricky, because there can be several different combinations (let's say I have 20 different tasks that can be completed in any order). Instead of storing 20 different booleans in the string, I'm thinking of creating a map/dictionary of all the possible combinations (I believe 190 in total) and the picking the combination the player has with a 2-digit hex (giving me numbers 0-256).

    All in all the above system would require a string of 1+1+2+2 = 6 characters and it might look something like this D5EACB. Because a clever player might understand that the numbers can be changed in order to cheat, I should come up with some way to scramble the code. I'm not sure what the best approach to that might be though.

  • Is there really no way to access the right-click menu without changing selection? IMHO a right click should not select anything, since we can already select with left click just fine.

  • This is the biggest workflow issue I have with the layout editor at the moment:

    I have several overlapping sprites, often on the same layer. I select one of them from the z-order bar (or sometimes through tab left-clicking). How can I now open up the right click context menu without messing up my selection?

  • I need this too!

  • Okay thank you, it's very helpful to know that at least esc and enter work. I guess I will just have to educate the player with a sign that tells them to hit esc when the texbox opens.