Flappin Bird Template Help

0 favourites
  • 6 posts
From the Asset Store
Fruit Slicer Template & Quality fruit and slice graphics (capx,c3p,png,illustrator files)
  • Hello, I have C2 for a long time but only now i start development with it. I am a Delphi coder and I have difficulties with the script system. I need some help in this:

    In Flapping Bird template, how can i make bird fly through 3 secondes before the obstacle start to come?

    Thanks in advance for help.

  • first idea:

    add global variable StartCounter

    every second add +1

    generate obstacles only if StartCounter > 3

    reset StartCounter on every fail

  • Thanks for you prompt reply. My problem is not de logic or algorithm but how to implement it. The event sheet is a good idea but it is very different of a language like Pascal, for example. For example, i need som example of how to post an event that only allows obstacles start to come when my global variable reach 3, as in you example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1.) Adding a variable.

    -- right click on the event sheet

    -- select the variable option

    -- name your variable, set the initial value

    -- close the prompt

    2.) Updating the variable.

    -- (double) click in the event sheet

    -- select "system", then find "every X seconds" and add it

    -- enter the amount you want (1 in the example above)

    -- close the prompt

    -- select the newly created event, click right of the conditions to create a new action

    -- select "system", then find "add to (global variable?)"

    -- select the variable you created

    -- enter an amount of 1

    -- close the prompt

    3.) Checking if the variable is >3.

    -- create an event, similarly as above, this time select "compare values"

    -- have the second value be 3

    -- have the selector window be greater than

    -- click in the window of the first value, select system, then find your variable in the list and click it, it will be added to the textbox

    -- close the prompt

    Modify the actions of this event to only create obstacles if the condition is true.

    This depends on the coding of the example you speak of, can't help you here.

    What i'd do additionally would be to add a check to the "add to value" event so that the event is only modified while its value is <3, as any actions to it are obsolete after it reaches 3, unless you want to use it afterwards.

    Also, creating a Flappy Bird clone isn't a good way to start developing games with C2, you should check out some of the tutorials to get a better grasp of how C2 works. I mean, honestly, the way logic of C2 works is somewhat similar to Delphi/Pascal or most conventional programming languages once you get yourself familiarized with the way the program looks.

    Update: can't count to 3.

  • If you tie the logic to the start of layout event then you can start your 3 second count from there.

  • Thanks a lot, people. I will try the example. generally, i pick a working example of a new language that i am learning to study. For me, it is better than tutorials. It is just a matter of how the tool works.

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