Im trying to using a javascript for set target to the buttons, in this case the target are scenes.
The buttons are inside a persisten symbol but Im trying to crea an “IF” situation.
Lets say “if” scene = home, the home button will stop working, in this way the user won’t be use the home button if he/she already is in the home scene.
In this way I also could use custom transitions for each button depending on which scene the user is.
But so far I have failed to use JS to assign the scene as targets.
Im sure it is because I (still) sucks at understanding code, but I can’t find a way to dynamically change the transitions using the same button using your code.
Your code works great for block the button that matches the same scene name, but, I believe, I can’t assign diferente transitions for each button for each scene.
In my hype file example the transitions for each button changes depending of which scene you are.