How do I handle a progress / resource bar with js?[SOLVED]

I would like to control Resource bar with js, but I am not able to find docs about it…

I tried:

const bar  = runtimeScene.getObjects("bar_recycle")[0];
bar.getValue() -> error
bar.getProgress() -> error
bar.setValue(10) -> error
barra.setProgress(14) -> error
bar.value -> nothing
bar.Value(10) -> nothing
bar.Value() -> returns bar value

Try bar.SetValue(10)
Capital S and Capital V

These seem to be the methods

I used this to get the methods courtesy chatGPT

const myObjectPrototype = runtimeScene.getObjects("MyObject")[0].constructor.prototype;
const methods = Object.getOwnPropertyNames(myObjectPrototype).filter(prop => {
  return typeof myObjectPrototype[prop] === 'function';

console.log("Methods of 'MyObject':\n" + methods.join("\n"));
1 Like

Works! thxs! that piece of code will be my salvation xDDD

1 Like