ActivePresenter Saola Animate Pricing Download

Modificate Catching Birds

Problem:
Hi, I’m looking to modify the Catching Birds template.

Currently, the game ends when time runs out, but what I would like to do is that when the score reaches 100, the game ends and changes scene.
Unfortunately I don’t have any knowledge in javascript…

Could you help me ?
Thank you!

Saola Animate version: 2.7.1

OS: Windows 10

Notes:

This should work.

Change the line that reads 'doc.score >= 7 ’ to the value of your choice.

  1. Replace the contents of the timelineEventHandler function with this code:

     function startTimer(duration) {
         var time = duration;
    
         function timer() {
             doc.getElement("div_timer").setText(time);
             time++;
             if (doc.score >= 7) {
                 clearInterval(timeinterval);
                 doc.showNextScene();
    
             }
         };
         timer();
         var timeinterval = setInterval(timer, 1000);
     }
     startTimer(0);
    
  2. Turn off the ‘auto-advance’ option for the scene.

birds.saolapack (172.4 KB)

It’s perfect, thank you !