Mouse and Solid Issues.

Bugs will be moved here once resolved.

Post » Sun Aug 30, 2015 1:48 am

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
B
7
S
2
Posts: 92
Reputation: 663

Post » Sun Aug 30, 2015 6:22 pm

try remove: cursor is over enemyUnit
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,025

Post » Sun Aug 30, 2015 6:45 pm

I did that. Cursor over enemy unit was added after, as a secondary attempt. This only worked when solid was removed.
B
7
S
2
Posts: 92
Reputation: 663

Post » Mon Aug 31, 2015 8:16 am

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.
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Tue Sep 08, 2015 3:29 pm

Closing, please see the bug report requirements.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,684


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest