Problem Description
Turret behavior "acquire target" does not works as expected. It seems like it tries to target the first(lowest UID as far as I can tell) instance of that object and if that is not in range it does not try to target other instances of that object.
Attach a Capx
setup 1
https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/turretBehaviorNotWorkingAsExpected.capx
(the next one here is just to make sure the second scenario mentioned below is understood)
https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/turretBehaviorNotWorkingAsExpected2.capx
Description of Capx
The capx contains a "shooter" sprite object with bullet and turret behavior and 2 types of targets.
Steps to Reproduce Bug
You have to run the capx in 2 variations to see the issue i am talking about.
- Run the .capx
- the "shooter" will move in range of the target with the number "2" on it and shoot
- After 3 seconds he will switch target to the target with the number "1" on it. (it will be the one closest to the bottom)
- That is what I would expect (as shown below it shoots at target "1"
- Now move the bottom "1" to a location further to the right (outside the range of the shooter turret) as shown in this screenshot:
Observed Result
The "shooter" will after the 3 seconds still keep on shooting at the target "2"
For me it looks like the "shooter" only looks at the first instance of target "1" and decides it is out of range and goes back to target "2" (as would be expected when the target is out of range)
Expected Result
I would expect the "shooter" to switch target to the second target "1" as it is clearly in range of the "shooter" turrets range.
Affected Browsers
- Chrome: YES
- FireFox: YES
- Internet Explorer: YES
Operating System and Service Pack
Windows 7 Home Premium SP 1
Construct 2 Version ID
163