Spawn an object from a variable.

  • 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

  • "Nickname" add-on. Search it in the Completed add-ons forum. If I'm understanding your requirements..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thx, it helped me and I managed to combine more than 160 events in 4 lines !!!

  • Yea it's nice

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)