On this application, i allow user not only to swipe from different slides but also allows them to tap on a buttons which will automatically shows the given slides when that given button is pressed.
Here's the problem:
If i tap on the "Fighter Button" of course the slide will go to Fighter Slide and it will show a "Fighter" Text on that slide, same with other buttons if i tap on them, unfortunately if im in the Mage Slide and i tap on the Assassin Button, instead of going back, it goes to Marksman Slide which is something i dont want to happen or if im in Tank Slide and i tap on Assasin, Mage, Marksman or Support Buttons, instead of going on that particular slide, it shows me the Fighter Slide. Do you have any idea on how to solve this?

CODE FOR THE BUTTONS

CODE FOR THE SWIPER

Solved:



Most helpful comment
Solved: