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?
@@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()];
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.
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.
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.
It is an awesome video, thank you.
Help Please
SyntaxError: expected expression, got keyword 'else'
Thank you so much!
Help Please
SyntaxError: expected expression, got keyword 'else'
nice man, just can you add the code on the description + can do another one how we can use reward AdMob in this ?
I have a AdMob Reword video here ua-cam.com/video/Chjho3eNtAc/v-deo.html
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?
Help Please
SyntaxError: expected expression, got keyword 'else'
Help
SyntaxError: expected expression, got keyword 'else'
Sounds like a missing ) or }
@@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;
}
}
@@SmartPenguins Please reply
i get this error JS Error [asset: Point, component: Set Checkpoint, line: 0] - ReferenceError: Setting is not defined
It should be "Settings" not "Setting", you are missing a "s" at the end
Help Please
SyntaxError: expected expression, got keyword 'else'
I did all steps, but score is still 0 point when ı use checkpoint.
same...idk , are we doing something wrong?
@@dariusebastian change from coins to points
Help Please
SyntaxError: expected expression, got keyword 'else'
@@mohamedtarek3685 from where
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.
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.
@@SmartPenguins what flag??
@@vladcriss just some boolean variable that you store in Settings like Settings.lifeused. so that you can have access to it globally.
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
@@vladcriss did he answer u?
if he did please tell me, cause i have the same issue
i do not have checkpoint loader !! i use free BB3
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.
@@SmartPenguins thanks man, you are the best