Prevent certain UID from being picked/instance var

Get help using Construct 2

Post » Tue Feb 04, 2014 3:54 pm

I am trying to create a tower defence game, where towers can heal each other.In general, I am trying to prevent certain UID from being picked, based on their instance variable.

Here is my test file
https://dl.dropboxusercontent.com/u/15249798/Pick%20UID%20from%20Array.capx
In the capx there are two factions.
Tower_1
Tower_2

What I want is:
Tower_1 Should'n aim at himself, which has been solved(Thnx Yann for your explanation in other thread )
Tower_1 should aim at the nearest tower, with one exception. He shouldn't aim at Tower_1 with health value 7 or higher.

In the capx, I have tried to insert all Tower_1 UID with health higher than 7 into an array.
Later on, Tower_1 will check if his picked UID exist in the aray. When it exist, it shouldn't pick that UID and should look for the second nearest and check it again and so on.

I have spend like two full days on it and I feel frustrated

ikke2902ikke29022014-02-04 18:25:12
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370

Post » Tue Feb 04, 2014 4:13 pm

Can you check your link please ?

Ok I've just copied the address and got it that way - but the link isn't working.

RamPackWobble2014-02-04 16:32:13
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Tue Feb 04, 2014 5:00 pm

This is very similar to another question from today - so I've taken that answer and just added health.

pick nearest health < 7
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Tue Feb 04, 2014 8:39 pm

This is amazing!
Thank you so much
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370


Return to How do I....?

Who is online

Users browsing this forum: Lightstone, Resslx, totoe and 24 guests