Store Gameobject into Varianle Selected from Family

0 favourites
  • 2 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hello all,

    I am working on Flappy Bird Clone Game. I am using different kinds of pipes instantiating at run time randomly selected from family. I am facing one problem that as Y position of my Lower pipe depends upon the Y position of upper pipe as Upper pipe Y position is also selected randomly at run time. is there any way that i can get the GameObject reference selected at run time so that i can give the position of Lower pipe according to that randomly selected gameobject's Y position.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shouldn't be hard to get the y-position of the last created pipe..

    Would be easier to explain if we knew your events to create them..

    If both pipes are created in the same event, storing the y-position of the first in a local variable and using that to determine the position of the second should work..

    That would use a system set variable to family.y after creating, or set the variable to a random number and creating both pipes based on it..

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