Jump to content
Sign in to follow this  
redmotion

bis_fnc_spawngroup and "side"- help!

Recommended Posts

This works everytime:

_defendgrp = [_locationPosition, side player ,(configFile >> "CfgGroups" >> "West" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")] call bis_fnc_spawngroup;  

However, I just can't work out how to spawn enemy units, one thing I don't know is what the "side" of insurgents in Takistan:

defendgrp2 = [_locationPosition, side player ,(configFile >> "CfgGroups" >> "East" >> "BIS_TK_INS" >> "Infantry" >> "TK_INS_Group")] call bis_fnc_spawngroup;

This works too. But if I put "east" as the side, they don't appear. I've tried various combinations like "side east", "east", "resistance" ,but nothing.

If I put down two groups of these (side player) they proceed to kill each other.

I'm stumped...

Thanks for any help.

EDIT: Also tried an alternative:

_group = createGroup east;
_unit = group _group createUnit ["SoldierGB", _locationPosition , [], 0, "FORM"];

Doesn't work either.

Edited by redmotion

Share this post


Link to post
Share on other sites

_group = createGroup east;

_unit = group _group createUnit ["SoldierGB", _locationPosition , [], 0, "FORM"];

Should be:

_grp = createGroup east;

_unit = _grp createUnit ["SoldierWB", _locationPosition, [], 0, "FORM"];

_neo_

Share this post


Link to post
Share on other sites

If you haven't already, try placing a single Takistani insurgent man on the map. I've encountered the same thing - if a unit of that faction isn't already placed, the group will not spawn. Not sure why.

Share this post


Link to post
Share on other sites

@fatty86, CarlGustaffa: Thanks for tips guys, that was the problem! No center or no opfor unit on map at start. Both are options.

@neokika: thank's for the correction - my biggest problem is missing these little things in the code! I've just discovered the commandline switch "-showscripterrors" which I'm going to look at tonight - hopefully should save HOURS of wasted to-ing and fro-ing between ArmaEdit and Arma2OA, wondering why something has stopped working!

---------- Post added at 12:40 PM ---------- Previous post was at 12:19 PM ----------

Another question, these units I'm creating are linked to a task. I'd the task to be "completed" once all the groups/units are dead. Whats the best way to do this? Create a trigger linked to the units at the same time? Or is there a neater way? Thanks.

Edited by redmotion

Share this post


Link to post
Share on other sites

EDIT: made new thread.

Edited by redmotion

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  

×