I’m making an game which i want to intergrate acheivements, I’ve got everything working to an extent but I’ve isolated code and put it in a test to show my problem. I have a MC called “ach” (without ") and inside that i have another MC called a1 , a2 , a3. They are animated to disappear after say 45 frames. I’ve put my acheivements on buttons just to test them, but in my game you get them for say playing for 1 hour or collecting all items and some for clicking hidden buttons etc. but when I click the buttons again the acheive MC keeps appearing. I only want it to appear once.
This is the code I have got that doesnt work.
Button Code :
on (release) {
_root.ach.gotoAndStop(3)
}
_root.ach.a1 (for example) code.
if (_root.ac1 == true) {
_root.ach.a1.play();
}
else {
stop();
}
on the last frame of a1
stop();
_root.ach.a1._visible = false
_root.ac1 = false
I have also said that _root.ac1 = true at start. But i’m confused why this doesn’t work :gas:. Can anyone help :D.
Thanks in advance.