my game is choosing class perfect, the camera follows the warrior perfect
but it doesn't follow the Mage class, only warrior.
this is my code.
Develop games in your browser. Powerful, performant & highly capable.
The code looks ok to me. Are you sure your warrior sprite doesn't have ScrollTo behavior?
Make the camera sprite visible, see if it actually moves or not, or check its position in Debug Mode.
I have made the camera sprite visible, its following the warrior perfect, and when i test it on the mage the camera doesn't follow.
my warrior sprite doesnt have a scroll to behavior, only the camera has it.
lmao i fixed it,
i forgot my mage still has the click to move events, so i just deleted and now the camera is following the mage perfectly XD
anyway thanks all
What is the initial value of 'Class'? If it is Warrior, then I see your problem. You only create the Warrior at the start of the layout, not the mage. The camera cannot set its position to an object that doesn't exist.
ReallyBasic, it is fixed now xD
XD I saw your post as soon as I posted mine