Geoffroymonde's Recent Forum Activity

  • Thank you all for your inputs !

  • Hello everyone, I'm having a problem for some time now, and havent find the solution yet.

    In my game, the player can write notes on his hand (it's a sprite of a hand). I setup something with textinput, making the textinput box invisible with CSS, and the letters appearing on the hand correctly. I'm not using a spriteFont for now (as I'm not sure it would suffice to solve all my issues). However, this method poses a few problems that I'd like to solve :

    1 - No cursor visible : It would be great to have a cursor visible, for the player to know where/when to type. I understand that's doable with sprite font (there's a great tutorial for a blinking cursor)

    2 - New line : Pressing enter should make a new line ; "append" doesnt suffice, as it only creates line break at the end of the whole text block, and not wherever the cursor is.

    3 - No Highlighting Using selecting functions like "select all" (ctrl+a) makes the invisible text (in the invisible input box) be visible through selection. The letters typed on the hand appear selected (highlighted) in the inputbox. Keep in mind I can't set it out of the layout, as the textinput function can't work like that.

    Do you think it'd be possible to create something with those 3 criterias ?

    Thanks a lot for any pointers/advice !

    Here's an example of problem number 3 (check the highlighted text in the top left corner) :

  • Hello,

    My game has an inputtext option for the player.

    The player doesnt actually see the inputtext box, because I linked its content to another text box (let's call it "output_txt_box"), for aesthetic reasons.

    So when the player types on his keyboard, the text is seen in the output_txt_box.

    I want to limit the number of characters that the player can input, but I want this limit to correspond to the size of the output_txt_box.

    Which means any solution having to do with the number of characters ("len", etc.) won't work in my case, as typing a 100 big "A" won't occupy the same space as typing a 100 small "i".

    But that's exactly what I'd like to accomplish : that the limit in the number of characters corresponds to the bottom right corner of the output_txt_box.

    Any idea how to accomplish that ?

    Here is a preview of my output_txt_box :

    Thanks !

  • Ok, but won't it create issues when exported, like when the player plays on a website (or even in a window) and resize his window, scrolls on the page, etc ?

    Is the problem only happening in the preview window ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, you're right, when changing the size of the preview window, the whole sphere effect changes, and adapt (eventually looking like intended at certain sizes).

    I noticed even when zooming and moving around in the layout view, the sphere effect reacts strangely in real time. Is there any way to "lock" this effect ??

    As you can see, the sphere effect "follows" the scrolling down of the layout scroll bar. Is there a way to apply this effect without it moving around like that ?

  • Hye !

    I'm using a sphere effect to emulate an old monitor screen effect.

    When parametering the effect in layout view, it works perfectly, but everytime I preview the layout, the sphere effect acts totally differently from expected.

    Layout view :

    the effect parameters :

    preview :

    Does anyone have any idea why I encounter this problem ?

    Thanks !

  • Thanks, I'll try that !! Seems simple enough, indeed !

  • Yes okay, I see what you're proposing. It's what I have in mind, but I don't see how to implement it.

    Since all players are instances of the same object (created at runtime), I don't understand how having a variable on that object would work.

    Like, if it is a boolean ("activeplayer"), it will be set True at the start of the layout for one of the instance (the one the player controls at the beginning of the game) ; and then, as soon as the player passes the ball to another instance, how would the boolean would have to be set up so it switches when the collision happens ? It can't be switched off while the ball is being passed, as the player will want to still control his character until the ball reaches another instance of the player...

    I feel like I'm missing/misundertsanding something very basic for it to work...

  • Hello !

    I'm trying to create a small soccer game to learn more about construct.

    I created a sprite for the player, and have coded some basic movements and actions with him and the ball.

    Now I'm trying to have the active player (the player answering to the controls) switch everytime the ball is passed to another player sprite.

    Note that all player sprites are created on runtime from the same object, and thanks to a function, hey each recieve a unique ID variable on creation ("player00", "player01", etc.).

    So on startup, I can differentiate which player is which (and for now, all the controls are attributed to the first player sprite created). How can I use that knowledge to create some kind of "active player" condition and have my coded behaviors separated between the active player and the AI ?

    Thanks for your help !

  • Okay, thank you !

  • Hye, thank you for your response !

    Unfortunately I have a hard time figuring it out ; it looks like the scale of the sprite is set in two different "every tick" actions ? Also, "sprite: set savedscale to self.width/self.originalWidth" a division or just a slash symbol ?

  • Hello,

    My project has sprites that all have collision polygons set up to react to the hovering of the mouse ; and the behavior of those sprites is to scale up a little bit when the mouse is over it (and then scale down when the cursor goes away).

    My problem is, the collision polygons scale up too - and that can create some glitchy behavior from the mouse cursor (it looks like it's staggering at ultra speed whenever it is "caught" between different states of the scaling sprite).

    How can I avoid that ? One way would be to create collision polygons on invisible sprites on top of the actual sprites so that they don't scale up at the same time as the actual sprite ; but it's going to be long to set up (I have many sprites of different shapes), so I was wondering if there was an easier method to go about it I didn't think about ?

    Thanks for your input !

Geoffroymonde's avatar

Geoffroymonde

Member since 13 Jan, 2024

None one is following Geoffroymonde yet!

Trophy Case

  • 1-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

4/44
How to earn trophies