So Yes I know how to code it but what I don’t understand is how this code here:https://playcanvas.com/editor/code/624824?tabs=25529770,24799274
Can be switched to this:https://playcanvas.com/editor/code/624824?tabs=25529770,24799274
Bsically I’m am I supposed to do something like this
var ScoreSystem = pc.createScript('scoreSystem');
//Numbers
ScoreSystem.attributes.add("zero", { type: 'entity', title: '0' });
ScoreSystem.attributes.add("one", { type: 'entity', title: '1' });
ScoreSystem.attributes.add("two", { type: 'entity', title: '2' });
ScoreSystem.attributes.add("three", { type: 'entity', title: '3' });
ScoreSystem.attributes.add("four", { type: 'entity', title: '4' });
ScoreSystem.attributes.add("five", { type: 'entity', title: '5' });
ScoreSystem.attributes.add("six", { type: 'entity', title: '6' });
ScoreSystem.attributes.add("seven", { type: 'entity', title: '7' });
ScoreSystem.attributes.add("eight", { type: 'entity', title: '8' });
ScoreSystem.attributes.add("nine", { type: 'entity', title: '9' });
ScoreSystem.attributes.add("ten", { type: 'entity', title: '10' });
//Points
ScoreSystem.attributes.add("p1", { type: 'entity', title: 'Point 1' });
ScoreSystem.attributes.add("p2", { type: 'entity', title: 'Point 2' });
ScoreSystem.attributes.add("p3", { type: 'entity', title: 'Point 3' });
ScoreSystem.attributes.add("p4", { type: 'entity', title: 'Point 4' });
ScoreSystem.attributes.add("p5", { type: 'entity', title: 'Point 5' });
ScoreSystem.attributes.add("p6", { type: 'entity', title: 'Point 6' });
ScoreSystem.attributes.add("p7", { type: 'entity', title: 'Point 7' });
ScoreSystem.attributes.add("p8", { type: 'entity', title: 'Point 8' });
ScoreSystem.attributes.add("p9", { type: 'entity', title: 'Point 9' });
ScoreSystem.attributes.add("p10", { type: 'entity', title: 'Point 10' });