Using Checkpoint System to Keep Score Points when implementing Extra Life - Buildbox (Space Shooter)

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 36

  • @nolaaa7
    @nolaaa7 4 роки тому +1

    It is an awesome video, thank you.

    • @alexjr977
      @alexjr977 4 роки тому

      Help Please
      SyntaxError: expected expression, got keyword 'else'

  • @Vaucyt
    @Vaucyt 4 роки тому

    Thank you so much!

    • @alexjr977
      @alexjr977 4 роки тому +1

      Help Please
      SyntaxError: expected expression, got keyword 'else'

  • @rayadirayadi3460
    @rayadirayadi3460 4 роки тому +1

    nice man, just can you add the code on the description + can do another one how we can use reward AdMob in this ?

    • @SmartPenguins
      @SmartPenguins  4 роки тому

      I have a AdMob Reword video here ua-cam.com/video/Chjho3eNtAc/v-deo.html

  • @brobazele
    @brobazele 4 роки тому

    before seeing this i was wondering how to use checkpoint to create extra life power up in game, so my question is ...how can this be converted to extra life power up?

    • @alexjr977
      @alexjr977 4 роки тому

      Help Please
      SyntaxError: expected expression, got keyword 'else'

  • @alexjr977
    @alexjr977 4 роки тому +1

    Help
    SyntaxError: expected expression, got keyword 'else'

    • @SmartPenguins
      @SmartPenguins  4 роки тому +1

      Sounds like a missing ) or }

    • @alexjr977
      @alexjr977 4 роки тому

      @@SmartPenguins I checked but nothing found
      ////////////////////////////////////////Checkpointlloader://///////////////////////////////////
      function init() {
      Settings.ourScorePoint=0;
      if (Settings.checkpoints === undefined) {
      Settings.checkpoints = new Object();
      Settings.checkpoints.load = false;
      Settings.checkpoints.worlds = new Object();
      }

      if (Settings.checkpoints.load) {
      let checkpoint = Settings.checkpoints.worlds[this.scene().name()];

      if (checkpoint !== undefined) {
      } this.scene().setScorePoint(checkpoint.score);
      } Settings.ourScorePoint=checkpoint.score;
      else {
      delete Settings.checkpoints.worlds[this.scene().name()];
      }

      Settings.checkpoints.load = false;
      }
      function start() {
      }
      function update(dt) {
      }
      function signal(name, value) {
      }
      ////////////////////////Addpoints/////////////////////////////////
      function init(){
      }
      function update(dt){
      }
      function signal(name, value){
      if(name == 'Enabled' && value){
      let amount = this.attribute('Amount');
      this.scene().addScorePoint( amount );
      Settings.ourScorePoints+=amount;
      }else if(name == 'Reset' && value){
      this.scene().setScorePoint( 0 );
      Settings.ourScorePoints=0;
      }
      }
      //////////////////////////////Setcheckpoint/////////////////////////////////
      function init() {
      if (Settings.checkpoints === undefined) {
      Settings.checkpoints = new Object();
      Settings.checkpoints.load = false;
      Settings.checkpoints.worlds = new Object();
      }
      }
      function start() {
      }
      function update(dt) {
      }
      function signal(name, value) {
      if (name == 'Enabled' && value && this.scene()) {
      let checkpoint = new Object();
      checkpoint.position = this.entity().position();
      checkpoint.levelName = this.entity().levelName();
      checkpoint.characters = new Array();

      let characters = this.scene().characters();
      characters.forEach(function(character) {
      checkpoint.characters.push(character.name());
      });
      checkpoint.score = Settings.ourScorePoints;
      Settings.checkpoints.worlds[this.scene().name()] = checkpoint;
      }
      }

    • @alexjr977
      @alexjr977 4 роки тому +1

      @@SmartPenguins Please reply

  • @d8mi8n
    @d8mi8n 4 роки тому

    i get this error JS Error [asset: Point, component: Set Checkpoint, line: 0] - ReferenceError: Setting is not defined

    • @SmartPenguins
      @SmartPenguins  4 роки тому

      It should be "Settings" not "Setting", you are missing a "s" at the end

    • @alexjr977
      @alexjr977 4 роки тому

      Help Please
      SyntaxError: expected expression, got keyword 'else'

  • @0xsezer836
    @0xsezer836 4 роки тому

    I did all steps, but score is still 0 point when ı use checkpoint.

    • @dariusebastian
      @dariusebastian 4 роки тому

      same...idk , are we doing something wrong?

    • @mohamedtarek3685
      @mohamedtarek3685 4 роки тому

      @@dariusebastian change from coins to points

    • @alexjr977
      @alexjr977 4 роки тому

      Help Please
      SyntaxError: expected expression, got keyword 'else'

    • @alexjr977
      @alexjr977 4 роки тому

      @@mohamedtarek3685 from where

  • @vijaydeshwal6464
    @vijaydeshwal6464 4 роки тому

    I added this function in my game and its working , but 1 problem in this that user can click on extra life every time after game over. so user can play unlimited time and increase their score. so how to implement that extra life button will come only 1 time after game over and after using extra life user can't able to take extra life.

    • @SmartPenguins
      @SmartPenguins  4 роки тому

      You'll need to add a flag that you can set when the game is loaded using extra life and before you load game over screen check that flag. If the flag is set, clear it and load game over screen without extra life button. If the flag is not set, set the flag and load game over screen with extra life button.

    • @vladcriss
      @vladcriss 4 роки тому

      @@SmartPenguins what flag??

    • @SmartPenguins
      @SmartPenguins  4 роки тому

      @@vladcriss just some boolean variable that you store in Settings like Settings.lifeused. so that you can have access to it globally.

    • @vladcriss
      @vladcriss 4 роки тому

      Can you give me the code or a video example on mail barosu7@gmail.com please, cuz im a noob, and i need it for my video game, Thx

    • @dariusebastian
      @dariusebastian 4 роки тому

      @@vladcriss did he answer u?
      if he did please tell me, cause i have the same issue

  • @rayadirayadi3460
    @rayadirayadi3460 4 роки тому +1

    i do not have checkpoint loader !! i use free BB3

    • @SmartPenguins
      @SmartPenguins  4 роки тому

      This video is made with free BB3, so everything you see in the video you can do too. To add it you select your World and at the bottom right corner there will be "Edit Components" Click that and you will find checkpoint loader there, it only shows up when you are editing components of the world you will not see it anywhere else. You can check in the video it might be to fest but you can slow it down if you want ua-cam.com/video/qn0ngBu4MOs/v-deo.html
      Sorry should off made a bigger pause there.

    • @rayadirayadi3460
      @rayadirayadi3460 4 роки тому +1

      @@SmartPenguins thanks man, you are the best