Jump to content

Recommended Posts

JBOY Boat Waypoints script


Vanilla boat AI is terrible at navigating narrow rivers.  This script fixes that problem.  Using this script, mission makers can now use waypoints to move boats up any narrow river that is deep enough for their boat to access it.  

I was inspired by the awesome Prairie Fire DLC map Cam Lao Nam that has many beautiful rivers and the Mekong Delta.  Let's fill those rivers with AI boats!



Download sample mission here.



  • Boats move to exact positions and can navigate narrow rivers, pass under bridges, etc.
  • Easy for mission maker to use:  Place move waypoints for boat, and place call to my script in first move waypoint.
  • Boats can back out from a beached position or a boat dock (if you put the word "reverse" in the move waypoint description).
  • Waypoints supported:  Move and GetOut.  I will add support for Transport/Unload later.
  • If a boat is beached, units exit boat and script terminates
  • When AI senses danger and switches to Combat Mode they will:
    • React verbally using various random in-game voice reactions: Under Fire!, Enemy Spotted!, Stay Low!, etc.
    • Boat will accelerate to max speed for boat.
    • 25% chance driver pops a smoke at back of boat to obscure their getaway
  • Some AI will ragdoll and fall from vehicle when killed (thanks to my Fall From Vehicles script which is also included)
  • Boat speed can be set by 2nd parameter to script call, or by default, it will be set by speedMode of Waypoint (Limited, Normal, or Full).  Limited will be 25% of max speed of boat. Normal is 50% of max speed.  Full is 75% of max speed.  100% (max speed) is reserved for when boat goes into combat mode, they will accelerate to max speed.
  • 3rd parameter to call is an "x offset", which means boat will travel x meters to right or left of waypoints.  This allows many boats to share same set of waypoints but travel in parallel paths to right or left of waypoint.


How to add to your own mission:

  1. From the demo mission, copy the JBOY folder into your mission folder.
  2.  Put the following code into your init.sqf to compile my scripts.

// init.sqf
call compile preprocessFile "JBOY\boatMove.sqf";
JBOY_Speak =  compile preprocessFileLineNumbers "JBOY\JBOY_Speak.sqf";
JBOY_PainGrunt =  compile preprocessFileLineNumbers "JBOY\JBOY_PainGrunt.sqf";
JBOY_BreatheSfx =  compile preprocessFileLineNumbers "JBOY\JBOY_BreatheSfx.sqf";
JBOY_PainSfx =  compile preprocessFileLineNumbers "JBOY\JBOY_PainSfx.sqf";
JBOY_Lip =  compile preprocessFileLineNumbers "JBOY\JBOY_Lip.sqf";

// Make all vietnamese guys speak chinese. This is optional!  I just want to hear the VC AI talk, and Chinese is better than just a squelch.
{if (speaker _x == "vie") then {_x setspeaker "male03chi";};} foreach allunits;


  1. Place a boat with an AI driver in the editor and create Move waypoints for him. 
  2. Note that each waypoint must have clear unobstructed line of sight to next waypoint (with no land in-between)
  3. In the first move way point, place a call to my script.  Here's three different formats for the call:
_n = [vehicle this] spawn JBOY_boatMoveWaypoints; // boat will follow waypoints with speed dictated by speedMode of waypoints (Limited, Normal, Full)
_n = [myboat,25] spawn JBOY_boatMoveWaypoints; // boat will follow waypoints, and speed will always be 25 (speedMode of waypoints ignored if speed specified).
_n = [vehicle this,0,-4] spawn JBOY_boatMoveWaypoints; // boat will follow waypoints, speedmode determines speed of boat, and -4 means boat will travel 4 meters to left of waypoints.  


  • Like 12
  • Thanks 1

Share this post

Link to post
Share on other sites

This is literally a game changer, thanks for putting in the work on this JB, feature rich and a great showcase, you are so awesome brother!



  • Like 1
  • Thanks 1

Share this post

Link to post
Share on other sites

Johnnyboy to the rescue (again!). Devs please start addressing your AI issues - its great we have scripters and modders to try and better these longstanding issues but dang cmon now where yall at ??


Looks great Johnny - love the AI backing up, tight navigating,  ragdoll getting shotted from boat and reactions -really great stuff. Might have to actually buy that DLC now


*kicks old dog and curmudgeonly grabs credit card

  • Like 1
  • Haha 2

Share this post

Link to post
Share on other sites

J-boy strikes again!  Wow, this is incredibly useful.  I love the flotilla at the end, boat on boat combat generally, the beached boat backing into the water ready for action, the ease of setup... the list goes on and on.  All scenarios you gloriosly present here would definitely be total clown shows with vanilla AI helming all these boats.


Time to populate the waterways of the armaverse with confidence, well done man. :thumbsup:

  • Thanks 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now