I am trying to do a “Character Screen Select”, where player can choose a Character (and then it will show name, stats and other things, nothing important right now).
When player click the character, it move to other location. And if player click again on him it back to his last position. That was “easy” (I had alot problems trying moving it, until I remembered that I needed a TimeLine for it).
Ok, I have the code needed for go and back, but… What about if player select other character while other was selected already? I thought about just don’t let him to do it, but it is really ugly and not player-friendly.
So… I started to do a code for check all those things. That was easy too (more or less). I guess there must be better ways to do it, but it work fine.
Then… What is the problem?
The problem is that code go crazy (and players location) when player click in a Character while the code is running (ie, player click 2 times by mistake, or just try select other).
Ok, there are 3 “possible” solutions:
1- Disable click events until code finish
2- A “wait until finish” event
3- A solution that I can’t imagine that let player to click when he want and character rectify their movement?
I accept tips ofc, in any way.
Thanks so much!
“back to their last position” code
“go to Focus code,”
Player 2 code is just the same than 1, just changing where say “chara1” to “chara2” and “player1” to “player 2”
Edit: Btw, the “delays” was just a try. Didn’t work ofc