Jump to content
BlackAlpha

BIS_fnc_spawnGroup not working?

Recommended Posts

I'm trying to get "BIS_fnc_spawnGroup" to work. Specifically, I'm trying to spawn a squad of AI.

As a test, I've been trying the following code:

_grp = [getMarkerPos "marker", west, 4] call BIS_fnc_spawnGroup;

There's a marker on the map called "marker".

No errors show up. No units are spawned.

The above does not work. Can someone please point out why? What am I missing here?

Share this post


Link to post
Share on other sites

It seems to me, that every BIS_fnc that I try, doesn't work for me...

Share this post


Link to post
Share on other sites

Yes, doesn't seem to be working with a number value on the units.

Works fine with config though:

_side = createCenter WEST; //Don't forget to create the center first, otherwise, if no WEST unit has been placed on the editor the group won't spawn
_grp  = [getMarkerPos "marker", _side, getText (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSentry")] call BIS_fnc_spawnGroup;

You might want to report the issue here in case you want to see it fixed. :cool:

Edited by neokika

Share this post


Link to post
Share on other sites
It seems to me, that every BIS_fnc that I try, doesn't work for me...

I know some of them do work. Maybe the functionality has changed on the ones you tried. Better to ask on the forum if someone else got them to work.

Yes, doesn't seem to be working with a number value on the units.

Works fine with config though:

_side = createCenter WEST; //Don't forget to create the center first, otherwise, if no WEST unit has been placed on the editor the group won't spawn
_grp  = [getMarkerPos "marker", _side, getText (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSentry")] call BIS_fnc_spawnGroup;

You might want to report the issue here in case you want to see it fixed. :cool:

Thanks, I'll try it without the number.

Share this post


Link to post
Share on other sites

the ones I've tried have worked fine - BIS_fnc_SelectRandom, BIS_fnc_spawnGroup (used with config), BIS_fnc_TaskPatrol and BIS_fnc_TaskDefend.

Share this post


Link to post
Share on other sites

They should all be in the config viewer. I don't have it infront of me sadly but CfgGroups is definitely in the config viewer.

Share this post


Link to post
Share on other sites

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad"

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad_Weapons"

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam"

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam_AT"

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Motorized_MTP" >> "OIA_MotInf_AT"

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Motorized_MTP" >> "OIA_MotInfTeam"

Share this post


Link to post
Share on other sites

No matter what I try, BIS_fnc_spawnGroup won't work.

I have a trigger with on activation:

nul = execVM "SpawnGroup1.sqf"; hint "bingo!";

The hint is displayed so I don't think the trigger is the problem.

Here's the content of SpawnGroup1.sqf:

if (!isServer) exitwith {};
_side = createCenter WEST;
_bluGroup1 = [(getMarkerPos "spawnPoint1", _side, getText (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSquad")] call BIS_fnc_spawnGroup;

triple checked the marker's name, no typo.

I'm at a lost, any help is welcome.

Share this post


Link to post
Share on other sites

grp1 = createGroup east;

grp1 = [getMarkerPos "Area4", east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_fnc_spawnGroup;

nul = [leader grp1,"Area4","TRACK","RANDOM","MIN:",2,"MAX:",3,"DELETE", 60] execVM "ups.sqf";

worked great for me, hope it works out for you :D

Share this post


Link to post
Share on other sites
Yes, doesn't seem to be working with a number value on the units.

Works fine with config though:

_side = createCenter WEST; //Don't forget to create the center first, otherwise, if no WEST unit has been placed on the editor the group won't spawn
_grp  = [getMarkerPos "marker", _side, getText (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSentry")] call BIS_fnc_spawnGroup;

You might want to report the issue here in case you want to see it fixed. :cool:

I tried it out with the config but it doesn't work. I also used your code exactly as you posted but it doesn't work either.

EDIT: Nevermind. It works with a different group config.

Edited by BlackAlpha

Share this post


Link to post
Share on other sites

guys where to type that codes, i am new in arma 3 and i am getting the same problem when i join the server, my character keeps flying in the sky and i am getting BIS_fnc_MP error(something like that)

Share this post


Link to post
Share on other sites
guys where to type that codes, i am new in arma 3 and i am getting the same problem when i join the server, my character keeps flying in the sky and i am getting BIS_fnc_MP error(something like that)

Some stupid hacker is doing that, i suggest you report it to Bohemia, now almost every server i join this happens, somebody told me it spreads from player to player so you have to exit the game before joining a new server.

Share this post


Link to post
Share on other sites

Oh thats sad man, i bought Digital deluxe, and now my 50 bucks are history, hope they'll fix it, so that means its not only problem with me, people are getting spammed with that messages just like me

Share this post


Link to post
Share on other sites

Does anyone have a simple working Arma3 script to spawn infantry group and make the group to move to a waypoint marker in formation etc?

with the formation settings etc like below?

//Create the waypoint.

private ["_wp"];

_AISpawnLoc = "AISpawn";
_AttckPos = getMarkerPos "AttackArea";



_grp1 = createGroup east;
_grp1 = [getMarkerPos _AISpawnLoc, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup;


_wp = _grp1 addWaypoint [_AttckPos, 0];

[_grp1, 0] setWaypointBehaviour "COMBAT";
[_grp1, 0] setWaypointFormation "COLUMN";
[_grp1, 0] setWaypointSpeed "LIMITED";
[_grp1, 0] setWaypointCombatMode "RED";

[_grp1, 0] setWaypointType "SAD";
[_grp1, 0] setWaypointCompletionRadius 20;

in the code above the formation behavior speed etc don't take effect

not sure wat i am doing exactly just using trial and error/modding from code i seen in the functions viewer

If someone can test it and post a working simple script It would be much appreciated

Edited by falconx1

Share this post


Link to post
Share on other sites

Yea I never do it that way it never works for me.

_AISpawnLoc = "AISpawn";
_AttckPos = getMarkerPos "AttackArea";

_grp1 = createGroup east;
_grp1 = [getMarkerPos _AISpawnLoc, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup;

_wp0 = _grp1 addWaypoint [ _AttckPos,0];
_wp0 setWaypointType "SAD";
_wp0 setWaypointFormation "COLUMN";
_wp0 setWaypointBehaviour "COMBAT";
_wp0 setwaypointcombatmode "RED";
_wp0 setWaypointSpeed "LIMITED";
_wp0 setWaypointCompletionRadius 20;

Share this post


Link to post
Share on other sites

As F2k Sel pointed out you always want to use the waypoint array returned from the addWaypoint command (_wp0) to make it easy.

[_grp1, 0] setWaypointBehaviour "COMBAT";

The [_grp1, 0] here refers to waypoint 0.

Waypoint 0 is a hidden waypoint that all groups get. It is the point you place them down on the map/spawn them. When you add the first waypoint for a group in the editor/by script it is actually waypoint 1 even though the editor dialog shows it as index 0.

Add a group in the editor, make your self the leader, preview and open debug console, type waypoints group player. You will see it returns an array of 1 waypoint (index 0).

Add a waypoint to the group in the editor (notice in the editor dialog it says waypoint 0), go back to the debug console and you will see it now returns a list of 2 waypoints, the one added being index 1.

Thought it maybe handy to know why it wasnt working.

Share this post


Link to post
Share on other sites

I can't get fnc_spawnGroup to spawn armour. It happily makes infantry and Motorised Infantry, but it won't make Armoured of any type.

 

_grpname = [_mypos, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Armoured" >> "OIA_MechInfSquad")] call BIS_fnc_spawnGroup;

Share this post


Link to post
Share on other sites

BI use the US spelling Amored, no U. I blame Jay for not trying hard enough to stamp his authoritative British rule. :P

Share this post


Link to post
Share on other sites

The real question is, of course, how do Geordies spell the word?

Oh is he.

Divvin nee.

howay man ganna ga doon il, propa like owa neet.

lol

  • Like 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

×