How do I ID who a turret is targetting?

Get help using Construct 2

Post » Sat Aug 29, 2015 11:24 pm

Is there any way I can get who a sprite with the turret behavior is shooting at?

I want to do something like "If <turret> is more than x distance from <target>, do something."

Is that possible at all?
B
7
Posts: 13
Reputation: 553

Post » Sun Aug 30, 2015 2:04 am

Yes, here:

Condition1: Turret has target
Condition2: Object pick instance with UID (Turret.TargetUID)
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,000

Post » Sun Aug 30, 2015 2:52 am

It seems like works! Thanks

Funny thing is that i thought of something like that, but since I have to pick an object (and there would be many possible objects as target) I didn't try it.

But now I realize what I have to do is create a family for all these objects, and use that as the object.

And it works!

Thanks a lot. That will allow me to do a lot of interesting things ;)
B
7
Posts: 13
Reputation: 553

Post » Sun Aug 30, 2015 4:12 am

Anytime :) have fun
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,000


Return to How do I....?

Who is online

Users browsing this forum: NN81, Syazanie Amirin and 7 guests