Jump to content
Sign in to follow this  
DTM2801

Convoy Manager

Recommended Posts

Convoy Manager

Version: 1.0

Author: DTM2801

Description:

This addon wil create a fully configurable convoy and will monitor all convoy vehicles to maintain formation using fsm script.

Standard settings can be changed in the userconfig file (more details below), but can also be changed in the initfield of the module through 'setvariable' commands.

When a vehicle is unable to move (or driver is dead) an attempt will be done to reinventory available vehicles to restore the convoy formation.

If the distance between convoy vehicles gets too far the forward vehicle will slowdown and eventually stop until the follower gets back

in formation.

This addon is MP compatible, running serverside only.

Addon is signed and key is included.

Usage:

IMPORTANT: *** CM_config_DTM2801.hpp has to be placed in this location on your harddrive: <ARMA2 DIR>\userconfig\DTM2801 ***

Convoy options:

1. Convoy with default vehicles, spawns vehicles using the convoysize and default side vehicles with controlscript.

- Place the module [Convoy Manager - DTM2801] on the map where you want the convoy to start (incl. direction), settings will be read from the userconfig file.

2. Convoy with classname vehicles, spawns all vehicles in the defined array with controlscript.

- Place the module [Convoy Manager - DTM2801] on the map where you want the convoy to start (incl. direction).

- Module init:

this setvariable ["CM_vehiclearray",["classname","classname"]];

or change the default values in userconfig file. This will change the default settings!

3. Convoy with preplaced vehicles on the map, adds waypoints and controlscript.

- Place the module [Convoy Manager - DTM2801] on the map where you want the convoy to start (incl. direction).

- Module init:

this setvariable ["CM_customarray",[vehiclename,vehiclename]];

or change the default values in userconfig file. This will change the default settings!

4. Convoy with preplaced vehicles and waypoints, using only the control script.

- Place the vehicles on the map and name them.

- Vehicle inits:

1st vehicle - nothing

next vehicles -

nul= [this,true/false debug] execFSM "\CM_DTM2801\fsms\CM_control_DTM2801.fsm";

Details on the userconfig default values can be found in the file as comments.

Editor module init variables:

CM_location - Starting location of the spawned convoy (default: this)

CM_side - Side of spawned vehicles (WEST,EAST,RESISTANCE,CIVILIAN)

CM_wparray - Names of the waypoint markers (with "")

CM_wpcycle - Waypoint cycle (true/false)

CM_convoysize - Number of spawned convoy vehicles (default: 5)

CM_delay - Time between spawns (default :7)

CM_vehiclearray - Vehicle classnames to replace defaults (with "")

CM_customarray - Vehicle names on the map (without "")

CM_wpmarkers - Waypoint dots on the map (true/false)

CM_debug - Debug messages (true/false)

CM_west - Default West vehicle

CM_east - Default East vehicle

CM_resistance - Default Resistance vehicle

CM_civilian - Default Civilian vehicle

CM_vehname - Name of spawned vehicles, number will be added behind name (with "")

Usage:

this setvariable ["nameofvariable",[setting]];

for multiple entries like vehicles, waypoint marker names.

this setvariable ["nameofvariable",setting];

for single entries like side, wpcycle, debug

You can enter multiple variable strings in one placed module, so you have different kinds of convoys on the same map with its own settings (side,vehicles,waypoints, etc).

Todo & upcoming features:

- code improvements, depending on feedback.

Please report any encountered errors/bugs.

Required addons:

- Community Base Addons

Mirrors:

Armaholic - http://www.armaholic.com/page.php?id=8389

Filefront - http://www.filefront.com/15003119/CM_DTM2801_v.1.0.rar

Edited by DTM2801
new version 1.0

Share this post


Link to post
Share on other sites

Addon version 1.0 released, all details can be read in mainpost and included readme.

Share this post


Link to post
Share on other sites

For your convoy manager, may I suggest you use an equation instead of all the switches? In Pseudo code (PM me for my own script)


// CONVOY_DISTANCE 30m
// CONVOY_SPEED 15m/s

VEH1 forceSpeed ((CONVOY_DISTANCE/(VEH1 DISTANCE VEH2)) * CONVOY_SPEED);

Edited by Rommel

Share this post


Link to post
Share on other sites
For your convoy manager, may I suggest you use an equation instead of all the switches? In Pseudo code (PM me for my own script)


// CONVOY_DISTANCE 30m
// CONVOY_SPEED 15m/s

VEH1 forceSpeed ((CONVOY_DISTANCE/(VEH1 DISTANCE VEH2)) * CONVOY_SPEED);

Thanks for the tip, was looking for a cleaner way to achieve this.

Share this post


Link to post
Share on other sites

This doesn't seem to work right. If I don't touch it, ie don't enter any information apart from this setvariable ["CM_wparray",[d1_6,d1_22]]; it creates 5 trucks all on top of each other, which then proceed to bounce around, and basically not drive anywhere.

If I try and use the preplaced functionality, adding this setvariable ["CM_customarray",[u1]]; and have a uaz named u1, nothing happens at all. I also tried this setvariable ["CM_customarray",[u1,t1,t2]]; having added 2 trucks correctly named. Again, nothing happened.

Share this post


Link to post
Share on other sites

nothing happens when i use pre placed vehicles when i do not enter anything in the init it works ok

Share this post


Link to post
Share on other sites

Some demo missions would help alot :-)

This seems to be a nice thing but going into trail and error is

not an option for everyone to see in the above posts.

MCPXXL

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
Sign in to follow this  

×