Turret : changing instance target

Get help using Construct 2

Post » Fri Jan 10, 2014 6:13 am

my first post here.

i'm trying to make a tower defense game and i'm unable to change the target of the tower (turret). The target is very specified, as this is a tower defense game, there's multiple instance of the object (enemy).


i am able to change target if there's multiple objects as target, though. By first clearing the turret target, then adding only the specified object to target.


The 'unacquire target' on turret seems to work, but then it simply targets the same target rather than changing to the specified target i clicked.


here's my trial : /u/158057323/testTurret.capx
^
(it's a dl.dropboxusercontent link)vahnyourdoom2014-01-10 06:23:51
B
8
Posts: 14
Reputation: 428

Post » Fri Jan 10, 2014 12:00 pm

edit : fixed on different object,i did it wrong, lol

still unable to specify target instance, though...vahnyourdoom2014-01-10 14:24:53
B
8
Posts: 14
Reputation: 428

Post » Fri Jan 10, 2014 1:36 pm

I just couldn't understand your problem and also can't download the example. You want to change turret target to the clicked object?
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Fri Jan 10, 2014 2:22 pm

@Windwalker

sorry, not enough rep to actually post a link.
dl.dropboxusercontent.c.o.m./u/158057323/testTurret.capx

(remove the extra dots in 'com'

but yeah, i simply wanted to change target into the clicked object

the object is the same, only different instancevahnyourdoom2014-01-10 14:23:06
B
8
Posts: 14
Reputation: 428

Post » Fri Jan 10, 2014 11:05 pm

Here is one way to do it - but I do hope there is a better/correct way

select target with mouse

If the selected target goes out of range then I think the gun will lock onto the next target in the list.

Good luck.

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,892

Post » Sat Jan 11, 2014 12:35 pm

a better example ?

capx
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,892


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests