Jump to content

DTM2801

Member
  • Content Count

    118
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About DTM2801

  • Rank
    Sergeant
  1. Wow, you are going all out :cool:, gonna take your script for a spin. If this works, it shouldnt be a big leap using it to spawn units of the same vehicles side,faction taking available vehicle cargo space in account. (Having that said, didnt we talk about more simple? hehe) TEST Result: Looking good, like you said spawning WEST side US soldiers returns empty array. EAST and RESISTANCE work fine. If the _minUnits could be converted to _maxUnits based on cargo space its working exactly as wanted. Gonna dive in to it tomorrow after work:). Awesome job Demonized!
  2. Thanks I'll give that a go, still there must be a more simple way to do this. Without the faction in the equation the spawngroup function is pretty straight forward.
  3. Can you use BIS_fnc_spawnGroup creating units of the faction from unit that calls it? This is the script I'm using: _cargoNum = _spawned emptyPositions "cargo"; if (_cargoNum > 0) then { _fillSlots = round (random _cargoNum); _pos = getpos _position; _locGr = _pos findEmptyPosition [10, 100]; _dir = getdir _spawned; if (_locGr select 0 > 0)then { _cargo = [_locGr,(side _spawned), _cargoNum,[],[],[],[],[_fillSlots,.5], _dir] call BIS_fnc_spawnGroup; {_x moveInCargo _spawned;} forEach units _cargo; if (_joingroup) then {{[_x] joinSilent (group _spawned)} forEach units _cargo;}; }; }; It choses the side of the unit, but how would I define lets say side WEST, faction BIS_US? I'm aware of the "CfgGroups" as described here, but how to incorporate that with the functionality of this script (spawning random side/faction soldiers based on the cargo space of the vehicle). Tips on how to achieve this would be much appreciated.
  4. You download, extract the archive and put manhattan.sqf in your missionfolder\compositions folder. The init would be: null= ["manhattan", getdir this, getpos this] execVM "Createcomposition.sqf"; This should work.
  5. Have you tried to change the side to "INS" in the initstring btw?
  6. You got a point there.. I'll have a look at the code tomorrow.
  7. DTM2801

    GLT Dynamic AI

    Interesting features, will try this when I get home.. thanks for sharing
  8. You can adjust the distance and speed in convoy_control.sqf, in the last version (1.6) the distance is too short and results in the stop and go behaviour and the distance (_dist) should be increased. You can tweak this yourself, but here is an better working version: This could be the result of a waypoint behaviour setting, if its not "SAFE" the vehicles wont stick to the road. If this is not the case please give some more info about what settings are used.
  9. DTM2801

    Convoy Manager

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

    Convoy Manager

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

    Convoy Manager

    Its an addon but executed server-side, so clients dont need the addon. Its not tested by me on any mp map, but it should be fine. If you want a scripted version its here http://forums.bistudio.com/showthread.php?t=90208
  12. 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
  13. Thank you for the responses @Myke found what I was looking for in the overview (misc -> nearestPosition), thanks for posting the list.
  14. Can anyone help me out with probably something I missed. First a little background info: I'm currently working on a modulair fsm driven convoy addon, what I'm trying to achieve is to select the vehicle (in the same group) in front of the current unit to start calculating distance and needed actions. This is called via a fsm script, but should be almost the same for a normal sqf aswell. Finding nearest objects with nearestObjects [(_unit select 0), [], 100]; goes fine, but will also find every other object within the radius. Question: How can I configure the findnearestobject (or other command which I dont know about) to filter and only find/allow vehicles that are in the current vehicles group or custom vehicle array (which is also available). Thanks in advance.
  15. Its about time ;) If you want to change the waypoint type you could use the control-script only option. This will stay this way for these scripts (unless you code it yourself ofc) until I finish the replacement modulair scripts that will allow waypoints to be configured seperately.
×