Results 1 to 7 of 7
  1. #1
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235

    Click 2 move / Point and click

    Hey,

    Today is the day that i didnt have anything to do.
    Sooo i made you a simple but effective click to move / point and click setup.


    What does it do?
    - you click somewhere with your mouse and the player walks to it.
    - you can also use WSAD (not build in, ive build 1 keyboard actuator in it with all keys(just to see if it works, and for you to see how too make the WSAD)
    - it navigates through a navmesh, but this is not needed, just put the steering actuator at seeking and u can remove the navmesh.
    - the waypoint is not added everytime you click, but i made it that you just move the waypoint through out the whole game.
    - u can click and drag the waypoint, to disable this option just turn off the true pulse from the mouse actuator (then u cant drag it anymore).

    This click2move is made out of logic bricks, and 1 script to define the click position.


    The blend:
    click to move.blend

    I hope you like it.
    Cotax
    Last edited by Cotaks; 12-Dec-14 at 11:30.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



  2. #2
    Member mziskandar's Avatar
    Join Date
    Nov 2008
    Location
    Malaysia
    Posts
    583
    Cool! Thanks cotax!
    http://digitalspine.blogspot.com
    Asus ZenBook. Intel i3-3217, 1.80GHz, 4GB RAM, HD4000, SSD. Windows 8.1. Linux



  3. #3
    Member martin.hedin's Avatar
    Join Date
    Jun 2012
    Location
    Las Palmas de Gran Canaria, Spain / Stockholm, Sweden
    Posts
    719
    Awesome!



  4. #4
    I have a small question. How can I make it stop at the waypoint and not drift past it?



  5. #5
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    Originally Posted by thepiratebob View Post
    I have a small question. How can I make it stop at the waypoint and not drift past it?
    the drifting is becouse of te steering actuator, u can increse the material friction or select the waypoint and turn of the ghost mode in the physics tab.

    ghost mode is enebled for the aswd function, if u turn of ghost mode player will collide with the waypoint.



  6. #6
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    18,513
    Ever checkout navmesh.findPath()

    you can remove steering actuator, and use custom behavior
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  7. #7
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    Originally Posted by BluePrintRandom View Post
    Ever checkout navmesh.findPath()

    you can remove steering actuator, and use custom behavior
    At the time when i made this script/setup, no. I even hear it now for the first time i always used the brick, thanks for the info.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •