samedi 24 décembre 2016

Detect which movieclip you hit (AS3)

Im developing a game in AS3, And I ran into problem. I have the movieclip: ExitPoints. And inside this movieclip, there some other movieclips like: e_1, e_2, e_3 and e_4. When the player hit the ExitPoints movieclip, I want the game to trace which movieclip the player is standing on (e_1 or e_2 or e_3 or e_4).

I know I can make a code like:


but I want to do it automaticlly with creating a lot of if statements. Any help?

Aucun commentaire:

Enregistrer un commentaire