Ai Quality chooser for game


#1
var BallAi = pc.createScript('BallAI');


//Connects ai and the game//
//
//

BallAi.prototype.decide = function() {
    var decide = this.enable();

};
BallAi.attributes.add('Ball',{type:'entity'});
BallAi.attributes.add('root',{type:'entity'});


BallAi.prototype.quality = function() {
  this.app.root.world(function () {
     console.log('choose quality'); 
      this.root.Toworld.quality();
  });
};
console.log('return');

BallAi.prototype.intaize = function() {
  this.ball.collision.on(this.entity.diabled);
  this.ball.root.determinequality();
};

BallAi.prototype.quality = function() {
  if(this.ball.Toworld.on);  
    this.quality = 100>60;
    this.quality.Toworld.on(60>50);
};

BallAi.prototype.quality = function(decide){
  this.ball.quality = decide.quality.Toworld;
    this.ball.dlevel.quality = true;
    this.ball.Toworld = decide.quality(100>0);
};

Ok so I tried making a quality ai chooser depending on ur pc performance determines the quality but idk if it works or not theres errors or anything!!!

#2

So do you want someone to test it out or…?


#3

Obviously