1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Trouble with script AI

Discussion in 'General Discussion' started by No Name2242, Jul 30, 2023.

  1. No Name2242

    No Name2242
    Expand Collapse

    Joined:
    Dec 24, 2022
    Messages:
    2
    Hi! I'm trying to set up a scene for a cinematic video I'm working on, and script AI is not really working the way I want it to.

    Basically, I have a bunch of traffic cars (19 of them, plus a "camera car" in front) with AI paths, and I want a lead car to weave through them while chased by a couple of police cars.

    I can drive the lead car manually, but since I can't drive multiple cars at once (and multiplayer, which I've already tried, has too much desync with this many cars spawned) I need script AI to drive the two police cars.

    But, no matter how fast I drive while recording the paths, the AI fall way behind and, because they're no longer timed properly with the path, crash into the traffic cars the path was supposed to avoid.

    Is there a way to get the AI to stick more closely to my original inputs, or even (though I don't think this is possible) just drive all three manually by "stacking" replays? (As in, driving one car while recording a replay, then somehow loading the replay and driving another car while it plays).

    Any help is appreciated; if I can't get it to work I'll have to either scrap the scene entirely or record in small, awkward to work with segments.
     
    • Like Like x 1
  2. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Hello,
    As of the latest release, there is a new ScriptAI tool available in the world editor. It is called the ScriptAI Editor. Documentation can be found here: https://documentation.beamng.com/world_editor/tools/scriptai_editor/

    Designed for tighter vehicle-to-vehicle interactions, you might find much better luck with this, since the accuracy you require is now available. You can also add in and edit a camera path directly in the tool, to meet your requirements.

    Hope this can help.

    Dave
     
    • Like Like x 1
  3. No Name2242

    No Name2242
    Expand Collapse

    Joined:
    Dec 24, 2022
    Messages:
    2
    Yeah, I noticed that in the patch notes - I'll be trying it out in the future.
    As for the camera path editor, I use that pretty extensively already - I just prefer the natural suspension movement of a camera car for certain shots, since it adds sort of a cinematic feel.
     
  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