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
not playerUnit hasFired
player unit has line of site to enemyUnit.X, enemyUnit.Y
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
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.
Clicking on the sprite would not register at all. Conditions were checked and double checked. Only removing solid fixed this issue.
Click on the sprite should set the variables mentioned above.
Construct 2 Version ID