How do I Tell Which Instance gets new direction?

0 favourites
  • 3 posts
From the Asset Store
Create your game with this complete pack of images and animations!
  • Hello;

    I assume that the second instance of Cogo1 in step 2 (the Cog01 that got created on layer 1) is the one that changes direction.

    So when a Cog01 has an energy bigger than 100 it spends 50 energy and creates a new one with energy at 40?

    Is there a way to specifically reference the first Cog01 after the next Cog01 is created inside Step 2.

    thanks for your time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is indeed possible but a bit tricky.

    Before you create the new cog (that will see all the actions after the action "Create object" applied to it) set a reference to the "original" cog object.

    To do so you can use a local/global variable in which you put the UID value of the original cog.

    Then, as a subevent after the new cog creation you use the system condition "Pick all" cog. Add also the condition "Pick cog by UID" and put the variable in which you kept the UID of the original cog.

    From now on, in that subevent all the actions apply to the old cog.

  • Thanks Kyatric. I am going to wait til I understand Contruct 2 better before I do stuff with the UIDs and global variables.

    yours

    Winkr7

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