This isn't working:
const myPlay = runtime.objects.btnPlay.getFirstInstance(); myPlay.enabled = True;
This doesn't work either:
myPlay.setEnabled(True);
Any suggestions?
Second Question:
I have Javascript in two different events. I have a function in the first event. Is there a way to make this global, so the Javascript in the other event can access it? Right now I have the same function in both events...
1. construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/buton
2. You need to move the function into the "Imports for events" script.
Develop games in your browser. Powerful, performant & highly capable.
The booleans true and false are written lowercase in JavaScript. If you're new to JavaScript I'd recommend taking the Learn JavaScript in Construct course which covers the basics such as this.
true
false