Mouse and Solid Issues.

0 favourites
  • 5 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Problem Description

    Left click on object was not working until solid behavior was removed from the object. This is the only edit that was made to make this work. Not sure why.

    My action conditions

    on left button clicked on enemyUnit

    cursor is over enemyUnit

    playerUnit isTurn

    playerUnit isFiring

    not playerUnit hasFired

    player unit has line of site to enemyUnit.X, enemyUnit.Y

    Action

    playerUnit set mouseX to Mouse.X

    playerUnit set mouseY to Mouse.Y

    set destAngleX to enemyUnit.X

    set destAngleY to enemyUnit.Y

    set destAngleSet to true

    set rotateToDestAngle to true

    Debug readout on playerUnit

    isTurn 1

    isMoving 0

    mouseX 691.830985915493

    mouseY 58.59154929577465

    hasFired 0

    isFiring 1

    destAngleX 693.2717046230803

    rotateToDestAngle 1

    destAngleY 59.32356140793535

    destAngleSet 1

    Line of site for the playerUnit is 120px

    Steps to Reproduce Bug

    • Check to make sure your conditions are right.
    • If all else fails check to see what behaviors your using with mouse. Solid was the issue in this event.
    • Try removing the problem behavior if possible.

    Observed Result

    Clicking on the sprite would not register at all. Conditions were checked and double checked. Only removing solid fixed this issue.

    Expected Result

    Click on the sprite should set the variables mentioned above.

    Affected Browsers

    • Only tested in Firefox.

    Operating System

    Windows 8.

    Construct 2 Version ID

    R204.2

  • try remove: cursor is over enemyUnit

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did that. Cursor over enemy unit was added after, as a secondary attempt. This only worked when solid was removed.

  • why did u make this

    playerUnit isFiring

    not playerUnit hasFired

    they are the opposite, and they wont work together. u have to make them separated actions (not in the same condition)

    and did u changed the cursor from sprite ??? if u did it then u have change the imagepoint of the cursor sprite.

  • Closing, please see the bug report requirements.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)