Turret behavior - Acquire target not working as expected

Bugs will be moved here once resolved.

Post » Wed Mar 05, 2014 10:51 pm

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"
    Image
  • Now move the bottom "1" to a location further to the right (outside the range of the shooter turret) as shown in this screenshot:
    Image

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
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Mar 12, 2014 7:58 pm

Thanks, should be fixed in the next build.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Wed Mar 12, 2014 7:59 pm

@Ashley
Appreciate it!
B
20
S
6
G
4
Posts: 347
Reputation: 4,451


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest