Outdated Waypoints (paths) for cars - v1.0.7

Discussion in 'Programming' started by Incognito, Aug 16, 2013.

  1. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Did you read the documentation (installation page)? Simply copying the files in folder is not enough.
     
  2. pf12351

    pf12351
    Expand Collapse

    Joined:
    Feb 24, 2013
    Messages:
    396
    Re: Waypoints (paths) for cars

    index.html isn't working in internet explorer :(

    Oh no, I fixed it :)
     
  3. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Added the installation file for automatic installation with Lua-mod-installer .
    Unpack the "InstallScript" archive, in BeamNG Lua-mod Installer select wp.bls and press "Install" button.
     
  4. youdidwhat!!

    youdidwhat!!
    Expand Collapse

    Joined:
    Feb 8, 2013
    Messages:
    723
    Re: Waypoints (paths) for cars

    how do i install it?
     
  5. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Read the documentation (help.zip).
     
  6. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    Re: Waypoints (paths) for cars

    Very nice script. Also helpful as we can see some of the LUA stuff in action.

    PS: I got a simple (unrelated) question that you may be able to answer. Can you tell me why typing 'showAIGUI()' in system console does nothing (see end of 'main.lua') ?

    EDIT:
    Nevermind this time it worked. I'm sure I got it 'not' to work previously but not sure why. Anyways I'll try making some canvas menus and maybe one for your script (unless you already planned it heh).
     
  7. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Maybe not worked because there was another mode is selected in the console (not BNGS).
    I thought about creating GUI, but still did not look how to do it.
     
  8. Confused_Deer43

    Confused_Deer43
    Expand Collapse

    Joined:
    Jun 8, 2013
    Messages:
    400
    Re: Waypoints (paths) for cars

    That's awesome!!
    They look like random traffic and it brings the world slightly more to life, i'll definitely be using this mod once i upgrade to a pc that can handle more than one car! :p
     
  9. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    Re: Waypoints (paths) for cars


    I'm nearly done with it actually ;). Was not that hard. Will post it soon.

    - - - Updated - - -

    Ok so here is for those who want a first GUI editor for this script. For the moment I just added the things that didn't involve using a user input as I don't yet know which controls can be used. So you can already:
    - start recording path
    - stop recording path
    - clear waypoints
    - start running the path with the player vehicle
    - stop running the path with the player vehicle

    I also added the 'Add point' function but for some reason I'm getting an 'Error in error handling' exception ...

    Anyways here's what you can do to use this:

    - replace the '[game dir]\lua\system\waypoints.lua' file with the provided one ( if Incognito agrees ;) ), will for sure only meet requirements for the current version at this point
    - edit '[game dir]\scripts\client\inputmaps\keyboard.inputmap.cs' and add '%mm.bindSLuaCmd(keyboard, "ctrl y", "wayPoints.showGUI()", "" );' to the end of the file (replace 'ctrl y' with any shortcut you'd prefer)


    How to use:

    - press 'ctrl+y' to open the menu (or the shortcut you decided to use instead)
    - for all options except 'Add point' choosing it in the list will do the job
    - for 'Add point' (not yet working correctly) the 'Apply' button will repeat the action

    WaypointsEditor.jpg

    If Incognito or anyone can tell me why I get that error in 'Add point' I'll be glad to read it.

    EDIT:
    see post below for working 'Add point' and 'Load' & 'Save' file options
     

    Attached Files:

    #49 GregBlast, Sep 9, 2013
    Last edited: Sep 9, 2013
  10. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Because wayPoints[carId] is not initialized.
     
  11. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    Re: Waypoints (paths) for cars

    Here's an updated version with load and save file included. It spawns a text box when the option is chosen and the 'Apply' button does the job (load / save) on the entered file name. I checked if there was points defined before saving because it was firing an error.

    Also 'Add point' is working now.

    WaypointsEditor2.jpg

    PS: if you think it's good enough you can include these changes in the first post
     

    Attached Files:

    #51 GregBlast, Sep 9, 2013
    Last edited: Sep 9, 2013
  12. graysonk95

    graysonk95
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    42
    Re: Waypoints (paths) for cars

    I still can't figure out how to get the carId. No matter what vehicle I'm in, wayPoints.printCurrentCarID() doesn't do anything...
     
  13. JoeDirtThe3rd

    JoeDirtThe3rd
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    34
    Re: Waypoints (paths) for cars

    I am almost positive extracted everything right on key, because it works, but all I get is cars trying to crash. Even with the path recorder and everything. are the map waypoint files supposed to be in Lua/System? or where?
     
  14. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Choose BNGS mode in console.
     
  15. JoeDirtThe3rd

    JoeDirtThe3rd
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    34
    Re: Waypoints (paths) for cars

    Thank you. Solved my problems :D might I say it's way better now that the cars don't just crank the wheel and gun it in a circle then head towards the nearest mesh XD very good work:D
     
  16. stickNmove

    stickNmove
    Expand Collapse

    Joined:
    Sep 24, 2013
    Messages:
    3
    Re: Waypoints (paths) for cars - doesn't work for me.

    Can't get this to work. Have done everything posted in the YouTube Tutorial Videos (1 & 2). I am attempted to set up waypoints on the newest "Open Road" map on the WIP's section of the forum.

    Car ID's do not show up either when I type wayPoints.printWayPointsForCar(carId). If I put a number in the "(cardId)" spot, it shows no errors - I thought this was to acquire the ID of a car you have selected though? The default truck sometimes accepts ID "2", when ID "1" gives an error. How does a vehicle have 2 different ID's?

    I tried doing a recorded path as well to no avail.

    My console is set to BNGS during all attempts. Running the newest version of BeamNG 3.0.5

    I checked my "Waypoints" folder in my dame's directory - I see no saved files, even though I have saved multiple waypoint files with no errors shown in the console while saving. I think this is where my problem is - I cannot get any saved .lua files to show up in my waypoints folder, no matter how many times I save. I can do all of the above with no displayed errors in the console, but the waypoints folder never has any new .lua files (have tried saving 15+ times).
     
    #56 stickNmove, Sep 25, 2013
    Last edited: Sep 25, 2013
  17. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    The message "WayPoints saved" appears? Are you sure you have properly installed the mod?
    P.S. After resetting (CTRL + R) the car - his ID is changed.
     
    #57 Incognito, Sep 25, 2013
    Last edited: Sep 29, 2013
  18. Olrosse

    Olrosse
    Expand Collapse

    Joined:
    Jan 21, 2013
    Messages:
    111
    Re: Waypoints (paths) for cars

    is this dead or still been working on?
     
  19. myfabi94

    myfabi94
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    71
    Re: Waypoints (paths) for cars

    I seem to be to much of a noob to actually know where to find the GUI console and I cannot seem to find (nothing there where the pic points at when in either F11 or F10 menu) the BNGS option and everything else. Where do I have to go to do all the stuff, where to start? The help doesn't help me a lot.
     
  20. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Waypoints (paths) for cars

    Press ~ to open a console.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice