Stop Towers from targetting themselves?

Get help using Construct 2

Post » Wed Apr 10, 2013 6:54 pm

I am trying to create a TD game with a more complex aiming behaviour...
not only should towers (and enemys) be able to damage others of the same instance but also heal them later (in different cases of course )

Problem is... I cant even get them to Target each other properly =D

Example file:

-Drag and drop Green or Red boxes to place green or red towers
-Green Towers Target Red Towers and vice versa
-on clicking a red Tower (not the "buying box") this Tower should be toggled "confused" (Instance boolean)
-Confused red towers are supposed to target other red towers


-On Clicking a Red Tower EVERY Red gets "confused"
-Confused Reds seem to Target themselves as they rotate to 0 degrees

If anybody would be able to help me?^^ I'm Confused!!   
Posts: 7
Reputation: 289

Post » Wed Apr 10, 2013 8:27 pm

I believe you need to look into IID and UID to specify specific instances of the tower... Sorry not in front of construct right now so can't provide a better example. Check the manual on using UID and IID. Unique ID and Instance ID.
Posts: 1,833
Reputation: 14,668

Post » Wed Apr 10, 2013 8:40 pm

[QUOTE=BluePhaze] Check the manual on using UID and IID. Unique ID and Instance ID.[/QUOTE]

Thank you for your reply:

I cant see a way to integrate UIDs into the default turret behaviour.

I tried to script the targeting without behaviors but couldnt find the possibility to check on a list of instances instead one.

I think that would be needed for terms as:

if - distance


< range ----> fire at (notself)

Any Tips on that?
Posts: 7
Reputation: 289

Post » Mon Apr 15, 2013 1:07 pm


I'm using the free version and thus am not able to use "families" could anyone spend a few minutes and try if using this option could help me out?

If yes i'll finally have to go for the full version.

Thanks a lot!
Posts: 7
Reputation: 289

Return to How do I....?

Who is online

Users browsing this forum: burak22 and 8 guests