Game Engine
Learning
Licenses
Forum
News & Stories
Downloads
Login
EN
DE
EN
FR
ES
IT
CZ
Menu
×
Game Engine
Learning
Licenses
Forum
News & Stories
Downloads
Login
Language
DE
EN
FR
ES
IT
CZ
Send character to mouse position
1
#1, by
dror-ben-hur
Saturday, 19. May 2018, 12:44
8 years ago
Hi all,
How can I send my character to the mouse position?
Thank you!
dror-ben-hur
Newbie
27 Posts
#2, by
ke4
Saturday, 19. May 2018, 13:24
8 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.
ke4
Key Killer
810 Posts
#3, by
dror-ben-hur
Saturday, 19. May 2018, 14:24
8 years ago
Thank you for the quick and accuracy reply!
dror-ben-hur
Newbie
27 Posts
1