Make click to move only work on background please?

brett-nortonbrett-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

  • pHghostpHghost London, UKMember Posts: 2,342

    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.

  • brett-nortonbrett-norton Member, BASIC Posts: 64

    Worked great thanks again.

Sign In or Register to comment.