zimzim's Recent Forum Activity

  • Hi. I have tried to do this myself and found one issue which I cannot solve <img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral"> . Perhaps it is due to my noobish programming style. I try my best to explain the situation as below:

    LAYOUT

    • There are 5 boxes:
      • Lime
      • Green Forest
      • Black
      • Magenta
      • Purple
    • There are 3 families:
      • GreenBoxes - which contains Lime and Green Forest boxes
      • PurpleBoxes - which contains Magenta and Purple boxes
      • PlayerBox - which contains the Black Box
    • All families have two instance boolean variables:
      • OnHighlight - when mouse is hovered over a box, OnHighlight is set to true for that box. OnHighlight for that box is set to false when mouse is hovered outside that box.
      • OnClicked - when a box is left clicked, OnClicked is set to true for that box. OnClicked for that box is set to false when areas outside that box is left clicked.
    • There are 2 types of highlighter:
      • OnHighlight (OH) highlighter
      • OnClicked (OC) highlighter

    OBJECTIVES MET

    • When mouse is hovered over a box, an OH highlighter appears at the centre of the box. The OH highlighter disappears the moment the mouse is hovered outside the box.
    • When a box is left clicked, an OC highlighter remains even when the mouse is hovered outside the box. The OC highlighter only disappears when areas outside that box is left clicked.
    • For the player box (black box), when mouse is hovered over it, an OH highlighter appears at the centre even when the player moves, provided that the mouse is hovered over it during moving.
    • For the player box (black box), when mouse is clicked on it, an OC highlighter appears at the centre even when the player moves or/and the mouse is not hovered over it during moving.
    • When a coloured box is left clicked and the mouse is still hovered inside that coloured box; when the player box moves into the coloured box and towards where the mouse pointer is, an OH highlighter is set on the player box (on player box layer) while the OC highlighter still remains on the coloured box. When the player box moves away from the pointer after this, then only the OC highlighter is seen on that coloured box.

    ISSUES

    • While mouse is hovered over one of the coloured box, when the player box moves into that coloured box and towards where the mouse pointer is, a bug occurred in which (provided that the mouse is within that coloured box the whole time):
      • The OH highlighter now spawns on player box layer
      • When the player box moves away from the mouse, the OH highlighter disappears, even though the mouse is still hovered over the coloured box.
      • The OH highlighter will appear again when the mouse is hovered over the overlapped section between the player box and the coloured box.

    OBJECTIVES NOT MET

    • When mouse is hovered over one of the coloured box, and when the player box moves into the coloured box and towards where the mouse pointer is, then the OH highlighter is set on the player box (on player box layer) instead of on that coloured box. When the player box moves away from the pointer after this, then the highlighter is set on that coloured box again (on coloured box layer).

    ATTACHMENT

    https://www.dropbox.com/s/a23goc6149v4p ... osave?dl=0

    I hope my description of the issue makes sense. I feel that this is a beginner's issue and therefore would love to hear how the pros do this properly. Thank you so much for your kind assistance.

  • Thank you so much both of you. It took me a while to understand how to apply such logic in construct 2 layout, but I finally get it:

    It's not what I asked for in the first place, but the theory is similar

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi. I would like to know how to set a function where pressing F on the keyboard will change a textbox to display "Auto" and pressing F again will change the textbox to display "Manual". Thanks.

zimzim's avatar

zimzim

Member since 1 Mar, 2015

None one is following zimzim yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies