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
Operating System
Windows 8.
Construct 2 Version ID
R204.2