Spawn an object from a variable.

Get help using Construct 2

Post » Mon Aug 11, 2014 2:11 pm

Hello

I am making a tower defense like game.

There are turrets which can be upgraded .
Here is the upgrading tree :
1 base turret > 4 possibilites > 4*4 possibilities > 4*4*4 possibilites.

This means there is a lot of differents turrets and I don't want to make one event for each upgrading possibility.

I though about givings IDs to the turrets to have the same event which adapts for any upgrade by using the IDs

Like :

1 -
11
111
211
311
411

21
121
221
321
421

31
131
231
331
431

41
...

2 -
12
22
32
42

3 -
13
...

So I wanted to know If it was possible to do something like : If touch on object family turret, display 4 buttons and if one is clicked spawn turret "1andID" or 2andID or...

I hope that was clear.....

Thank you :)
B
5
Posts: 11
Reputation: 231

Post » Tue Aug 12, 2014 5:43 am

"Nickname" add-on. Search it in the Completed add-ons forum. If I'm understanding your requirements..
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Aug 12, 2014 9:46 am

Thx, it helped me and I managed to combine more than 160 events in 4 lines !!! :D
B
5
Posts: 11
Reputation: 231

Post » Tue Aug 12, 2014 12:10 pm

Yea it's nice :)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: Darknessed and 41 guests