This is a bug.
In real time using the Turret and LOS combination Turret target mode incorrectly interpreted and not separately for each facility, and according to a certain sequence all at once (I'm guessing that every tick). This raises a major problem in the Turret no longer respond correctly to the target and not correctly using target mode.
The problem is bypassed through the "For Each" but then there is a problem elsewhere.
Steps to Reproduce Bug
As soon as the second target becomes visible in the second Turret, LOS begins to "ignore" solid wall, because Turret target mode stops functioning correctly (or nearest, or fiurest, every time difference)
Turret and LOS combination - Turret target mode incorrectly interpreted and not separately for each facility, and according to a certain sequence all at once (I'm guessing that every tick).
Operating System and Service Pack
Construct 2 Version ID
I try only 176 and 216.
*.capx here: holder.lt/capx/TurretAndLOS.capx
There are several different ways to upload an example capx.
"Better one time show, than 1000 times tell."
A .capx is required or the report will likely be closed automatically by Ashley.
Also, watch your language - this forum is used by many different age groups and profanity in any form is unacceptable.
I try only 176 and 216. Same s**t.
It seems I have found a simple solution, but I am not sure or do not miss anything.
Also in this * .capx file ( holder.lt/capx/TurretAndLOS2.capx ) i give two examples:
1. One example is working, and quite good.
2. On the other practically identical, but there is one bug, then start layout ...
Check the sound What goes on
Friends, I have found a better solution. Improve decision making in the TurretAndLOS 2.capx and fix some issues. If someone interested, contact me.
In the meantime, we look forward to what the moderator said, and what will be their verdict on the bug.
The solution I found and it seems to work:
Your example of not quite right ... If the test better, you'll see that adding more players, and moves with it on the screen, some of Turret start to shoot into the wall. If you try to get rid of the problem, you will see that the turret began gliching then try find target. Also you will see that when a player leaves behind a wall, turret sequence it anyway. But if you really try, and maybe circumvent possible failures.
But turret target mode work good ( I tried the following principle, but personally I refused, for reasons previously mentioned )
Do not forget about multitargeting.
I don't really understand the .capx. If I just run it, nothing happens, and I'm not sure if that's the problem or if the problem only happens when I create some extra objects as the instructions say. Turret and LOS are designed to do different things: LOS takes in to account obstacles between the two objects, but Turret does not, so it might just be down to that misunderstanding. Can you make a simpler demo?
Develop games in your browser. Powerful, performant & highly capable.
New *.capx here: holder.lt/capx/TurretAndLOS3.capx
Maybe I wander with logic. But if you look to events shit, you will see WORKING AND NOT WORKING EXAMPLES, with some Differences. (In working example you add "foreach").
Construct 2 not show any alerts, as there is no reason. But do Turret working correctly?