Buttons playing wrong scripts

Hi.
Still messing with a very simple project but not being able to solve weird issues:
Object has animations: Start, explosion and reverse. Animations are taken from inside FBX objects.
Also 2 buttons with scripts to activate animation and reverse animation ( 2 different anims).
Also labels ( only 1 at the moment) is supposed to activate animation and reverse animation depending on the button depressed. Very simple.

The problem: When I hit “Play”, “Reverse” animation is played instead. When I hit “Reverse”, nothing happens. But everything seems to be OK.


The only activated label via scripts does what it wants (forget about the rest of upside down labels)
Animations are OK when I play them separatedly with no scripts.

https://playcanvas.com/project/769417/overview/inter_simple_back

The build::

the concerning stuff:
image

Thank you in advance

Hello @Juanjo3D! I took a quick look at your project. The problem with your reverse button is because you have two reverse.js scripts in your project. The one on your button is empty. I couldn’t find the problem with the other animation so quickly.

Yes you are right!!!


it seems if you create ( sometimes) a script its not visible until you refresh page (Chorme, win10) so I get junk around that I can not see…I will refresh more often.
Now it seems to work ( only one label so far but all the rest of the elements).
I’m animator since 1998. Not a single line code since WRML, Basic, cobol and fortran ( Jurassic languages). After a few nightmare days…starting to like jScripts and UR blueprints.
When my sick programmer is back to work he’s not going no believe it.
Thanks again :sweat_smile: :sweat_smile: :sweat_smile: :sweat_smile:
2 Likes

I can confirm that. I have the same problem on my Windows 10 laptop with Chrome.

Good job! I hope you don’t get too good in coding, because your sick programmer would like to keep his job. :yum: