Combining LOS with turret behavior

For questions about using Classic.

Post » Wed Sep 01, 2010 4:53 am

Hello again, I'm back already needing more help! I'm trying to get the LOS and turret behavior to work on a single object to make a turret which will not only not shoot at a target behind a wall or something, but also preferably ignore said target until it leaves cover. What exactly would be the best way to implement this? I dabbled with some options such as deactivating the turret behavior when the object isn't within LOS, or forcing it to unaquire the target. This works great when there's only one target, but seems to confuse the turret when there's more than one. Perhaps there's some easy shortcut to make this work which I'm overlooking?

Thanks for any help!

Edit: OR, as a possible solution, is there any function(s) equivalent to "Rotate object towards an angle"?
Edit 2: Scratch the last edit, that didn't help at all. Still need some help combining LOS and turret behavior.
B
34
S
15
G
16
Posts: 267
Reputation: 10,684

Post » Thu Sep 02, 2010 1:08 am

Anybody? This is really causing me some frustration and I can't get it to work. I'd imagine this would be a pretty common thing for people to have in their games so I'm probably overlooking something obvious. Is there some easy way to tell the turret to ignore targets it doesn't have LOS to? When there's more than one target the turret will only engage them when all of them are in range, and often ignores targets if even one of them is out of LOS. :|
B
34
S
15
G
16
Posts: 267
Reputation: 10,684

Post » Thu Sep 02, 2010 4:52 am

Los is a bit iffy for this, especially with two behaviors that do almost the same thing.
I would suggest going at this from the other side such as "if enemy is overlapping solid".
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests