How do I Destroy only a tower and no the others towers.

Get help using Construct 2

Post » Tue Nov 17, 2015 9:04 pm

Hello boys and girls, I'm here trying to make the schedule to sell a tower, then destroy it happens that when I try to implement the code, Construct destroy all the towers of the same type available, how to destroy and sell only a tower specific.
B
32
S
9
G
3
Posts: 280
Reputation: 4,262

Post » Tue Nov 17, 2015 9:06 pm

In what way are you picking the right tower in the event?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 17, 2015 9:18 pm

The code is on: {}
{
When tower_1.isSelect = 1
and on touched object Sell_Obj - > Destroy Tower_1
}
* isSelect is a local variable of Tower1
B
32
S
9
G
3
Posts: 280
Reputation: 4,262

Post » Tue Nov 17, 2015 9:25 pm

I'm guessing

When tower_1.isSelect = 1

is a system compare action and as explained in the manual system compare doesn't pick any objects

If you change that to pick tower by comparison, it should probably work, if there aren't any conflicting events..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 18, 2015 7:08 pm

I still do not know how to solve this problem, what to use to do so.
B
32
S
9
G
3
Posts: 280
Reputation: 4,262

Post » Wed Nov 18, 2015 7:39 pm

Can anyone show me how to do it in code?
B
32
S
9
G
3
Posts: 280
Reputation: 4,262

Post » Thu Nov 19, 2015 1:12 am

system pick tower by comparison: tower_1.select = 1
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 19, 2015 2:46 pm

How do I implement this? how does this pick?
B
32
S
9
G
3
Posts: 280
Reputation: 4,262


Post » Thu Nov 19, 2015 8:33 pm

Sorry I still do not understand, it is because in my case the towers are espawneds in the layout, as in your case the fruits are already on the layout, then you know the value of the variable.
B
32
S
9
G
3
Posts: 280
Reputation: 4,262

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests