Send character to mouse position

  • #1, by dror-ben-hurSaturday, 19. May 2018, 12:44 6 years ago
    Hi all,
    How can I send my character to the mouse position?

    Thank you!

    Newbie

    27 Posts


  • #2, by ke4Saturday, 19. May 2018, 13:24 6 years ago
    Hi, you will need to use Lua. Here is an example of how you can achieve it.

    game.CurrentCharacter.Position = {x = getCursorPos().x, y = getCursorPos().y}

    You can check out the getCursorPos() function here: https://www.visionaire-studio.com/luadocs/#commands

    Note: Use Destination instead of Position if you want the character to walk there.

    Key Killer

    810 Posts

  • #3, by dror-ben-hurSaturday, 19. May 2018, 14:24 6 years ago
    Thank you for the quick and accuracy reply!

    Newbie

    27 Posts