nimos100's Forum Posts

  • I doubt this is a bug.

    As is outlined throughout the manual with regard to Form elements, they are rendered last above the canvas, so it seems logical that when moving over it, it would be top-most element and get focus.

    You might be correct. I believe the reason the form controls act the way they are is because they are web controls or what to say. But you would normally not select content of textbox in a non web control by simply dragging the mouse over it. So whether its possible to change that or whether its considered a bug im not sure of.

    But regardless of that problems does occur as you can see in my example when dragging a sprite around and suddenly form controls get focus when you would assume they wouldn't.

    So maybe its possible to add an exception or change the textbox so in order to select its content, you have to make an actually click on it to give it focus and not just by dragging the mouse over it, when the button is down. In a normal program that is not considered a mouse click, but again whether its possible or not i don't know, but think it would be a good fix to the already troublesome form controls.

  • Textbox form control

    Some of the 3rd party textbox plugins have a select all functionality, so thought it would be handy to integrate that as a standard functionality to the textbox object together with a deselect all.

    Select all - Select all text in a textbox

    Deselect all - Deselect all text in a textbox

  • Problem Description

    There seem to be a problem with textboxes and them getting focused when dragging your mouse over them, even when you are interacting with other elements.

    When you for instant drag a sprite around the screen and you happen to drag it over a textbox, it will start selecting the text inside the textbox.

    It seems broken in the sense that you would expect the program to focus on the sprite being dragged and not starting to select text inside the form controls if these doesn't have focus.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Textbox%20dragging%20bug/Textbox_dragging_bug.capx

    Description of Capx

    Just contain some textboxes and a sprite with drag/drop behaviour.

    Steps to Reproduce Bug

    Drag the sprite over the textboxes.

    Observed Result

    Expected Result

    That the focus would stay on the sprite and any mouse interaction with the textbox would be ignored. That selecting text inside a textbox would only happen if the textbox it self have first been activated by a mouse click, and that simply holding down the mouse button and dragging above them wouldn't give them focus.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • nimos100 did you report this as a bug in the bug section?

    No, Jase00 already added it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I get this too. At least I'm not alone! I made a bug report a week or so ago:

    Hope this gets fixed soon

    Guess I have to go back to r216 again until this is sorted.

  • I tried installing the new NW.js Alpha 7 and when I use the chosenpath it returns "c:\fakepath\<filename>" regardless of what file is chosen through the dialog. I guess this is because the feature haven't been added in the build yet?

    Are there any information regarding when this will be added, as my program wont work unless this does?

    Cheers

  • nimos100 Actually, what you mentioned above worked for my issue. Thanks!

    [quote:2iyu6zao]

    Every tick

    For Each EnemyBox

    Pick EnemySkin.Enemybox_UID = EnemyBox.UID

    ---> Set Enemyskin.X/Y = Enemybox.X/Y

    I see, that's good

    Well this method I use a lot, its good for linking things together. For instant if a unit is killed and depending on which unit it is, something else only related to this unit should also be removed. So storing the UID of the child in the parent object works very well for something like this, when the objects are not in a container.

  • nimos100 By container, do we mean Family? Do you usually put all the hit detect and health on the enemy box and the only thing the enemy sprite does is do the visual part?

    Not sure I understand your question, I was answering the OP regarding what he was trying to get help with. But guess your question is whether I would make a "hit box" and then attached a skin to it, only for the visual part? if that's the case, then I wouldn't use that approach, at least my first thought is that there are no benefits in doing it like that, or at least I can't think of a situation where I would find this to be needed. The reason is that you will end up using more objects than necessary, which will consume primarily memory if these are sprites.

    Besides that I would store all the variables in either a family or the sprite it self and simply adjust the collision mesh if I were unhappy with it.

    But again I weren't sure what the OP was working on, so it might have been needed for him. And my comment on the container was just, that he said it worked for him. And if that were the case then I guess he was happy

  • Timer behaviour

    Adding a few extensions to this behaviour would make it more complete and easier to work with.

    Stop all - Would allow you to stop all timers running for an object, regardless of the tag.

    Pause timer - Would allow you to pause a timer using its tag.

    Pause all - Same as above but would just pause all timers regardless of tag.

    Resume timer - Would allow you to resume a paused timer using its tag.

    Resume all - Would resume all paused timers for the object.

  • Hello i'm new on this forum and i've been using Construct 2 for a month. I want to know how to make an "enemy damage health text that resets every time i kill one". I explain better, i created a global value that every time i shoot an enemy by gun, the text score decreases his value by one and it resets when the health's enemy gets the 0 value. The problem is, when i shoot an enemy without killing it, the text doesn't reset and when i try to shoot a new enemy the value continues decreasing..

    I hope i explained well and someone can help me

    You cant use a global variable to keep track of enemies health. The reason is that you might have several enemies with different health values.

    So to make it work you need as many health values as you have enemies. So making them as global variables are very inefficient, instead you make a variable in the enemy object itself and call that "health" or whatever.

    Then when an enemy is hit by a bullet you use this value and display that in the text object that shows the health. Something like this:

    Bullet on collision with Enemy -> 
         Enemy.health = Enemy.health - 1
         Text.text = Enemy.health
    [/code:1uydszi5]
  • Bound to layout behaviour update

    The bound to layout is a quick way to keep objects within boundary limits. However this behaviour runs into problems if objects that fits the layout are suddenly rotated. In this case the object will start flickering as it tries to stay within the layout. So a minor update to this behaviour could fix it.

    Fit to layout - When this is turned on, an object will automatically scale to fit the layout in case it becomes to big.

  • Problem Description

    Not sure if this is related to the BB, Drag/Drop or bound to layout behaviour. But when an object is bound to layout using the behaviour and the object is dragged off screen the position returned from the BB values are incorrect compared to what you would expect.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/BB%20bug/BB_bug.capx

    Description of Capx

    A sprite and a list, dragging the sprite towards the top of the screen as if you wanted to drag it off screen, will fill the list with values return by the BBtop position.

    Observed Result

    Layout

    Dragging the sprite upwards

    As seen the list is populated with negative values from the BBtop return value, even though the sprite is bound to layout and never leaves it.

    Expected Result

    That the returned BBtop value would return 0 as its bound to layout.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • Support for multiple aspect ratios

    The fullscreen in browser settings are really nice when you want your game to support several resolutions. However a huge limitation occur when you want to support multiple aspect ratios.

    For instant the most common used ratios are 16:9 (1680x1050) and 16:10 (1920x1080), however there are no way, as far as I can see that you can make your program support both of these correctly when using "Request fullscreen in browser". And regardless of which method you use (Scale outer or letterbox scale) you are left with black bars either in the top and bottom using letterbox scale or only bottom using Scale outer. Since C2 can already support a single aspect ratio, extending this to be able to support multiple ratios would be a huge improvement I think.

    As an extension to the former suggestions regarding "Screen resolution", it would be nice with the following.

    Get system aspect ratio - Would return the aspect ratio of the system.

    Extend the fullscreen browser methods - The ability to tell C2 to target specific aspect ratios, so instead of just "letterbox scale" it would be "letterbox scale - (16:10)", "letterbox scale - (16:9)" and so forth. These methods should also be available in the browser object when requesting fullscreen mode.

  • Problem Description

    If a bullet is told to bounce of another object and the speed is set to 0, the bullet will jump to a X,Y coordinate of NaN, NaN.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Bullet_bounce_bug/Bullet_bounce.capx

    Description of Capx

    A sprite with platform and bullet behaviour, when the sprite is moved in contact with another sprite, its told to bounce off it with 0 speed.

    Steps to Reproduce Bug

    Press D to move the sprite into contact with the other sprite.

    Observed Result

    The sprite with bullet behaviour disappears and according to the debugger it is moved to an X, Y coordinate of NaN,NaN

    Expected Result

    That the sprite would stop next to the sprite when it contacts.

    Affected Browsers

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • I had this issue way before 216, but forgot to make a proper report, hope this will allow Ashley to fix it.

    Yeah its weird how a bug like this haven't been reported a lot of times. Because you would assume many people would run into similar problems.