canuckbrian

Help With Heli Reinforcements

8 posts in this topic

Hello,

I've been working on building a custom occupation mission for my Tanoa and Esseker servers. I have the missions spawning and working, however when it goes to call in the heli reinforcements I get an error message and I'm a little lost at what to do to resolve it.

Reinforcements Code:

Spoiler

_groupReinforcementsInfo =
[
	[
		_group,			// Group to monitor
		[
			[
				0,		// Let's limit number of units instead...
				0
			],
			[
				_AIMaxReinforcements,	// Maximum units that can be given as reinforcements (defined in difficulty selection).
				0
			]
		],
		[
			_AIdelay,		// The delay between reinforcements. >> you can change this in difficulty settings
			diag_tickTime
		],
		_pos,
		"random",
		_difficulty,
		_side,
		
		"heli_troopers",
		[
			_AItrigger,				// SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
			true,					// BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
			_AIwave,				// SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
			false,					// BOOLEAN: Whether or not to keep the heli flying around as a gunship.
			_pos					// OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader
		]
	]
];

 

Error Message:

Spoiler

15:22:46 Error in expression <le ["DMS_AssignedVeh",_heli];
};

_unit moveInTurret [_heli, _x];
};

case "carg>
15:22:46   Error position: <moveInTurret [_heli, _x];
};

case "carg>
15:22:46   Error Type Object, expected Number
15:22:46 File x\addons\dms\scripts\fn_SpawnHeliReinforcement.sqf, line 134
15:22:46 "DMS_DEBUG :: SpawnHeliReinforcement :: Created a bandit heli (Exile_Chopper_Hellcat_Green) with 8 crew members at [6776.33,966.725,500] with hardcore difficulty to group O Alpha 1-2, going to [1120.24,10279.4,0]. Units: [O Alpha 1-2:1,O Alpha 1-2:2,O Alpha 1-2:3,O Alpha 1-2:4,O Alpha 1-2:5,O Alpha 1-2:6,O Alpha 1-2:8,O Alpha 1-2:10] |::|::| (DMS_Version: "September 5, 2016" | time: 528.127 | diag_tickTime: 555.485 | 48.048 FPS)"
15:22:46 Error in expression <cle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_>
15:22:46   Error position: <typeOf _heliClass, _heli]) call DMS_fnc_>
15:22:46   Error typeof: Type String, expected Object
15:22:46 File x\addons\dms\scripts\fn_GroupReinforcementsManager.sqf, line 545
15:22:46 Error in expression <cle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_>
15:22:46   Error position: <typeOf _heliClass, _heli]) call DMS_fnc_>
15:22:46   Error Generic error in expression
15:22:46 File x\addons\dms\scripts\fn_GroupReinforcementsManager.sqf, line 545

 

Any help would be appreciated!

Share this post


Link to post
Share on other sites

Still can't seem to figure this out. I narrowed it down to just using 2 heli's. The Mohawk and the Huron. That seems to have gotten rid of the error message regarding line 134 of "fn_SpawnHeliReinforcement.sqf", but I'm still getting this other errorl

Spoiler

22:08:21 "DMS_DEBUG :: SpawnHeliReinforcement :: Created a bandit heli (Exile_Chopper_Mohawk_FIA) with 18 crew members at [10365.6,12420.1,500] with hardcore difficulty to group O Alpha 1-2, going to [1120.24,10279.4,0]. Units: [O Alpha 1-2:1,O Alpha 1-2:2,O Alpha 1-2:3,O Alpha 1-2:4,O Alpha 1-2:5,O Alpha 1-2:7,O Alpha 1-2:9,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>,<NULL-object>] |::|::| (DMS_Version: "September 5, 2016" | time: 542.745 | diag_tickTime: 570.464 | 48.1928 FPS)"
22:08:21 Error in expression <cle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_>
22:08:21   Error position: <typeOf _heliClass, _heli]) call DMS_fnc_>
22:08:21   Error typeof: Type String, expected Object
22:08:21 File x\addons\dms\scripts\fn_GroupReinforcementsManager.sqf, line 545
22:08:21 Error in expression <cle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_>
22:08:21   Error position: <typeOf _heliClass, _heli]) call DMS_fnc_>
22:08:21   Error Generic error in expression
22:08:21 File x\addons\dms\scripts\fn_GroupReinforcementsManager.sqf, line 545

 

In game, the heli's spawn, but they're unpredictable and seem to travel very slowly. They'll fly over the mission eventually and a bunch of AI will parachute out, then for some reason the heli lands and just sits there with rotor's spun up, but nothing happens after that. When I kill all the AI the mission won't end.

Share this post


Link to post
Share on other sites
Advertisement

Posted (edited)

hI @canuckbrian

Just wondering if you ever got reinforcements working?

I get errors trying this:

Spoiler

// Define the group reinforcements

_groupReinforcementsInfo =
[
    [
        _group,                                // pass the group
        [
            [
                _AIMaxReinforcementsWaves,        // Amount of reinfocements waves (defined in difficulty selection).
                0
            ],
            [
                _AIMaxReinforcements,            // Maximum units that can be given as reinforcements (defined in difficulty selection).
                0
            ]
        ],
        [
            _AIdelay,                            // The delay between reinforcements. >> you can change this in difficulty settings
            diag_tickTime
        ],
        _AISoldierSpawnLocationsHeli,
        "random",
        _difficulty,
        "bandit",
        "heli_troopers",                                // STRING: How the AI group should be managed. Supported types: "playernear", "maintain", "reinforce", "increasing_resistance", "armed_vehicle"
        [
            3,                                            // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
            "false",                                       // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
            5,                                            // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
            "false",                                       // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
            _pos,                                        // OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader.
            "Exile_Chopper_Huron_Black"             // STRING (OPTIONAL): The classname of the heli to spawn.
        ]
    ]
];   

(make sure you call the reinforcements at the top)

private ["_AIMaxReinforcements", "_AIMaxReinforcementsWaves", "_AIdelay",

and this underneath it:

_AIMaxReinforcementsWaves = 1;
_AIMaxReinforcements = 5;
_AIdelay = 10;

 

cheers

 

Edited by aussie battler

Share this post


Link to post
Share on other sites

I got it going. I had to have the heli not remain as a gunship and drop the gunners out.

Spoiler

                //heli reinforcements
    _pos,
    1,
    "random",
    "random",
    "bandit"
] call DMS_fnc_SpawnAIGroup;
[
    _group3,
    "random",
    "difficult",
    "bandit",
    _pos,
    true,
    5,
   false,
    "Exile_Chopper_Huey_Armed_Green"
] call DMS_fnc_SpawnHeliReinforcement;

 

Share this post


Link to post
Share on other sites

Hello 

Getting the following error 

Spoiler

16:53:17 Error in expression <alid parameters: %1",_this];
-1
};

if (isNull _AIGroup) exitWith
{
diag_log for>
16:53:17   Error position: <isNull _AIGroup) exitWith
{
diag_log for>
16:53:17   Error isnull: Type Array, expected Object,Group,Script,Config entry,Display (dialog),Control,Network Object,Task,Location
16:53:17 File \x\addons\dms\scripts\fn_SpawnHeliReinforcement.sqf [DMS_fnc_SpawnHeliReinforcement], line 41

Here is my script in the misison

Spoiler

// Set AIReinforcement Parameters
_AIMaxReinforcementsWaves = 3;
_AIMaxReinforcements = 6;
_AIdelay = 10;

// heli reinforcements

_groupReinforcementsInfo =
[
    [
        _group,                                    // group to monitor
        [
            [
                _AIMaxReinforcementsWaves,        // Amount of reinfocements waves (defined in difficulty selection).
                0
            ],
            [
                _AIMaxReinforcements,            // Maximum units that can be given as reinforcements (defined in difficulty selection).
                0
            ]
        ],
        [
            _AIdelay,                            // The delay between reinforcements. >> you can change this in difficulty settings
            diag_tickTime
        ],
        _pos,                                    // _AISoldierSpawnLocationsHeli
        "random",
        _difficulty,
        "bandit",
        
        "heli_troopers",                                // STRING: How the AI group should be managed. Supported types: "playernear", "maintain", "reinforce", "increasing_resistance", "armed_vehicle"
        [
            5,                                          // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
            "true",                                     // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
            6,                                          // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
            "false",                                    // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
            _pos,                                       // OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader.
            "Exile_Chopper_Huey_Armed_Green"               // STRING (OPTIONAL): The classname of the heli to spawn.
        ]
    ]
] call DMS_fnc_SpawnHeliReinforcement;   
 

 

Edited by LOGAN_

Share this post


Link to post
Share on other sites

if this is a DMS mission than try it without call DMS_fnc_SpawnHeliReinforcement .

i.e.

_groupReinforcementsInfo = [ your settings ];

 

 

Share this post


Link to post
Share on other sites

@LOGAN_ drop this in your bandit mission:

Spoiler

                //heli reinforcements
    _pos,
    1,
    "random",
    "random",
    "bandit"
] call DMS_fnc_SpawnAIGroup;
[
    _group,
    "random",
    "difficult",
    "bandit",
    _pos,
    true,
    5,
   false,
    "Exile_Chopper_Huey_Armed_Green"
] call DMS_fnc_SpawnHeliReinforcement;

 

Here is what it all means:

Spoiler

[
        _AIGroup,                       // GROUP: The group to which the heli will be assigned.
        _class,                         // STRING: The class of AI to spawn in the heli.
        _difficulty,                    // STRING: The difficulty of the AI to spawn in the heli.
        _side,                          // STRING: The "side" that the AI are on.
        _dropPoint,                     // OBJECT or ARRAY (Position2D or 3D): The location to drop the reinforcements at.
        _ejectFFVGunners,               // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
        _maxJumpers,                    // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
        _remainAsGunship,               // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
        _heliClass,                     // STRING (OPTIONAL): The classname of the heli to spawn.
        _spawnPos                       // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
    ] call DMS_fnc_SpawnHeliReinforcement;

 

I took the code from the Great @eraser1
 

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.