- Home /
Add repeating object
Yo, so i really want to add object that will repeat like in Flappy Bird
Those green block that repeat when bird goes forward. So if anybody know how to do that i would really want that :) Thanks
Answer by MileSplit · Jun 08, 2014 at 12:59 PM
Well,i have personally made a flappy bird clone and this is how i did it.
I placed four "Pipes" in the inspector and created a script that whenever a pipe was past the "bird" and out of sight it would move it in front of the "bird". If you want to add some randomness for the height then when you move a pipe set the location to pipe[0].transform.location = new Vector3(nextPipe*pipeSpacing,Random.Range(-1.0f,1.0f),0);
This is how i did it...
Hope it helps!
Hmm can you help me more please? i really don't know how would i be able to do that :s
Answer by Bilelmnasser · Jun 08, 2014 at 01:22 PM
instantiate them randomly in front of player , and destroy them when go out of camera view(play with their size & position randomly)
Answer by blazk · Jun 08, 2014 at 01:07 PM
Ohh yes i understand :) Can you maybe tell me for my game i have platforms like that:
4 platforms called Platform1 and so on. How could i write the script then? :) can you help in this way to :)) Thanks for your time
Your answer

Follow this Question
Related Questions
How to make main menu? 3 Answers
How to do that? 0 Answers
How to repeat with Boolean? 5 Answers
Why does my animation repeat? (CSharp) 1 Answer
Repeat notification android 1 Answer