Diablo-Style-Controls Question

  • #1, by CrossWednesday, 11. March 2015, 13:53 10 years ago
    Is there a way to have the character constantly follow the cursor while holding down left mouse, similar to the Diablo-games? I only find an Option to have him follow the cursor by either leftclicking or releasing the mousebutton.
    Since there is also no action like "follow cursor" i can't quite figure out how to do that.
    Thanks for any help

    Newbie

    92 Posts


  • #2, by afrlmeWednesday, 11. March 2015, 14:30 10 years ago
    Theoretical solution...

    1. create a called by other action.
    2. add these action parts.

    execute a script > (see block below)
    

    local spos = game.ScrollPosition
    local cpos = getCursorPos() 
    game.CurrentCharacter.Destination = { x = spos.x + cpos.x, y = spos.y + cpos.y }
    

    pause for 50ms
    jump to action part #1
    


    3. call this action in the mouse hold button action of the mouse properties tab.

    4. quit this action in the mouse button release action of the mouse properties tab. Also add a stop character action part to stop the character from walking.

    It should work, but as I said, it's purely theoretical.

    Imperator

    7285 Posts

  • #3, by CrossWednesday, 11. March 2015, 16:13 10 years ago
    It works absolutely fine. Thank you so much smile

    Newbie

    92 Posts

  • #4, by afrlmeWednesday, 11. March 2015, 16:15 10 years ago
    No problem. wink

    Imperator

    7285 Posts