Line of Sight, not working with same object type?

Get help using Construct 2

Post » Fri Aug 28, 2015 7:13 pm

Hi,

so i have these NPC-Ships that have a LOS behaviour and if they have LOS to the player they fire, now i wanted them to also shoot on each other but they wont. Is this by design or am i doing something wrong?

The event is like "if Ship has los to ship"->"ship shoot" , but no one is firing.
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Post » Fri Aug 28, 2015 7:31 pm

@fldr

I haven't tried what you are doing, but I know you can get around confusion (ambiguous calls) between objects of the same type by using a family. Create a ShipFamily and put your Ship object in it. then:

"if Ship has los to ShipFamily"->"shoot at ShipFamily" will help distinguish between who is shooting and who is the target.
B
94
S
33
G
20
Posts: 438
Reputation: 17,615

Post » Fri Aug 28, 2015 9:05 pm

AllanR wrote:@fldr

I haven't tried what you are doing, but I know you can get around confusion (ambiguous calls) between objects of the same type by using a family. Create a ShipFamily and put your Ship object in it. then:

"if Ship has los to ShipFamily"->"shoot at ShipFamily" will help distinguish between who is shooting and who is the target.

ha, that works like a charm! Thank you!
B
38
S
11
G
5
Posts: 485
Reputation: 5,340


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests