Make click to move only work on background please?
brett-norton
Member, BASIC Posts: 64
Hi All
I am struggling to keep my player only moving when mouse button is pressed on the background,
I have the players movement changed to mouse click whenever i click the screen. however when i click on an enemy to kill it my players movement also moves to the enemy's position how do i prevent this and only make it move to mouse clicks that are not enemy's?
Thanks in advance brett
Comments
Game attribute:
game.enemy_touch
Rule in enemy:
If pressed, change game.enemy_touch to 1, otherwise 0.
In actor, mouse button down and game.enemy_touch is 0, do your fancy move logic.
Worked great thanks again.