HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Click to Move  (Read 2475 times)


  • General Accounts
  • *
  • Posts: 39
  • HSL Programmer
    • View Profile
    • Daniel J. Burkhart
Click to Move
« on: Feb 07, 17, 05:01:08 PM »

Hello, I wanted to create a basic tutorial to explain how to create a quick click to move system using the Input_Mouse script. This can be expanded upon to suit your needs but for this tutorial all we are doing is setting up the system to where you can click on the ground and move to the location you clicked.

  • Open the following script: Input_Mouse (client side)
  • Go to the following function: OnMouseClick
  • Insert the following under the previously stated function and save, compile, and submit

Code: [Select]
heightmap as NodeRef = GetNodeUnderMouse()
target as Vector3
if not GetGroundUnderMouse(target, heightmap)
   return false
playerCharacter as NodeRef of Class HBNode = GetPlayerCharacterNode()
playercharacter["behave"] = "move navpoint " + target

You should now have a point click system in place!


  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Click to Move
« Reply #1 on: Feb 08, 17, 04:45:54 AM »

Thats awesome!