In my script, I made a status check for my booleans:
var bomber : boolean = false;
var hybrid : boolean = true;
var fighter : boolean = false;
function StatusCheck() {
if(bomber){
hybrid = false;
fighter = false;
}
if(hybrid){
bomber = false;
fighter = false;
}
if(fighter){
hybrid = false;
bomber = false;
}
}
It works, so if two of the booleans are true, they cancel each other out. So it works. But the problem is, in the inspector, if you click on one boolean, it should automatically uncheck any of the other ones. For example, is bomber is true, but I click on the fighter in the inspector, bomber should become unchecked. It still says bomber is false, but the inspector doesn’t uncheck it. How should I make it so it unchecks in inspector if I click on another boolean? (Putting it in the update function doesn’t work).