Jump to content
Sign in to follow this  
3inar

144 per side?!

Recommended Posts

ok so I was wondering if there where any way around this problem with only being able to be 144 grupes for eatch side?

I am making a mission where there is only one civilian in every grupe so I can only use 144 civilians as for now, tho I wold need a bigg bunch more of them so if there is any way of changing so you can use more than 144 grupes per side it wold be mutch apritiated to get some light on this :)

/// Best wishes 3inar!

Share this post


Link to post
Share on other sites

Link them with F2. Then they all will become only 1 group! :D

Hope it helps.

- Splicer.

Share this post


Link to post
Share on other sites
Link them with F2. Then they all will become only 1 group! :D

Hope it helps.

- Splicer.

hehe:D that wasent realy what I whanted, I still whant every Civilian to be in there own grupes. I dont like it when you se 2-3 civilians valking around in a formation it just looks weried, tried synchronising them but that dident work ether.

Any one got any other ideas?

Share this post


Link to post
Share on other sites

144 group limit is hard-coded.

There may be some magic workaround, but not that I am aware of.

Share this post


Link to post
Share on other sites
I dont like it when you se 2-3 civilians valking around in a formation it just looks weried, tried synchronising them but that dident work ether.

Any one got any other ideas?

Put lots of civilians in the same group. Give them a "dismiss(ed)" waypoint and you shouldn't have to worry about any formations anymore.

Though I don't know how they respond on moveTo or doMove commands now and if they will fall back (to the leader?) immediately after such a command has been fullfilled.

Share this post


Link to post
Share on other sites

Units will always fall back to formation after using commands such as DoMove, CommandMove, Move.

I'm trying to solve that issue too.

In VBS2 there is a function similar to DoMove but prevents units from falling back into formation.

The only solution which I can see is to spawn a group, combine every AI with the DoMove command with UnitReady and DisableAI "Move"

EDIT: The solution above does not work

Edited by RazorX

Share this post


Link to post
Share on other sites
Units will always fall back to formation after using commands such as DoMove, CommandMove, Move.

I'm trying to solve that issue too.

In VBS2 there is a function similar to DoMove but prevents units from falling back into formation.

The only solution which I can see is to spawn a group, combine every AI with the DoMove command with UnitReady and DisableAI "Move"

EDIT: The solution above does not work

Try doStop :)

Share this post


Link to post
Share on other sites
Units will always fall back to formation after using commands such as DoMove, CommandMove, Move.

I'm trying to solve that issue too.

In VBS2 there is a function similar to DoMove but prevents units from falling back into formation.

The only solution which I can see is to spawn a group, combine every AI with the DoMove command with UnitReady and DisableAI "Move"

EDIT: The solution above does not work

Ok thanks alot :)

Just, thaugt of a thing that might work or might not work.

Mabe if I do a civilian leder of a grupe but adds him as 0% chans of pressanse then adding a buleforce or opforce unit to the grupe, mabe it wont count as a civilian grupe then :P

If not I culd always do it the other way around so I just make the ledeer a blueforce or opforce with pressanse probability of 0% and then adds the civilian, this wold shorly make the civilian enemy to one side but thats where the "setfriend" comand comes in just make the opforce/blueforce friends with etchother.

Dont know if any one ells have a mission that will work like that but it shorly dose for me as I only whant the Independant side to be my enemy :)

Thanks for the hellp all and good luck with your missions :)

Share this post


Link to post
Share on other sites
Did you try stop?

stop doesn't work either. It seems that the unit never gets 'ready', after reaching it's destination (doMove), still regroups and then stops. Any idea how to fix it?

---------- Post added at 05:52 PM ---------- Previous post was at 05:11 PM ----------

Put lots of civilians in the same group. Give them a "dismiss(ed)" waypoint and you shouldn't have to worry about any formations anymore.

Though I don't know how they respond on moveTo or doMove commands now and if they will fall back (to the leader?) immediately after such a command has been fullfilled.

All right!

This works.

Simple example:

I've placed a unit and added "pacan = group this" to the init line.

then a simple repeatable trigger with activation "Radio Alpha" and activation: "[pacan] exec "spawn_civilian.sqs"". (You can exec the script however you want to, I did it this way)

and a "spawn_civilian.sqs" script

_team = _this select 0

_select = call compile loadFile "random_civ.sqf"

_unit = _team createUnit [_select, getmarkerpos "spawn1", [], 0, "NONE"]

_unit domove getpos player

exit

The "random_civ.sqf" is my function that returns a random unit's class, in my case - civilians:

_num = floor random 5;
_civ = switch (_num) do {
case 0: {"Doctor"};
case 1: {"Functionary1"};
case 2: {"Assistant"};
case 3: {"Priest"};
case 4: {"Policeman"};
};
_civ

What is vital?

The team leader, which has been placed on the map must have a waypoint "dismissed" placed on himself. And the leader MUST NOT die. if a team leader dies and the group is empty, spawning a unit in this group may cause that it will try to regroup to the group's previous (but dead) leader, or if the spawned unit detects that the leader is dead, it will do absolutely nothing (ignores domove commands). So what I did, is that I added to the leader's init line "this allowDamage false" and placed it somewhere where nobody will bother him (you can also place it on a ship and send way far out of a mission's area).

The example script spawns a unit at a position of marker called "spawn1" and makes the AI to go to the players position. You will notice that, when it reaches it's target, the unit will stop and it doesn't need any other commands like "stop" or "disableAI" (I may be wrong, but I haven't experienced any bugs yet).

You can now script any actions you want to the spawned units.

Cheers :)

EDIT:

Bugs found.... Other spawned units regroup to the first spawned unit even if the leader exists. Trying to fix it.... Hold on...

Edited by RazorX

Share this post


Link to post
Share on other sites

The issue still unsolved. Can anyone assist, please?

Share this post


Link to post
Share on other sites

Shame, shame, shame that nobody had posted it earlier...

So, what are we looking at?

I have a group of civilians, and I want each member of a group to go somewhere and stay there. I want to create plenty of units, so only 144 groups which I can create do not satisfy me. I placed the units in 1 group. By using doMove, commandMove etc. the units will reach the location and after that return to formation, I don't want that.

solution? simple SQS script

_unit doMove _position
_unit enableAI "MOVE"
@ unitready _unit || !(alive _unit)
_unit disableAI "MOVE"

No hard-thinking, as simple. What were we thinking of?

Shame...

But, disabling the movement AI requires much more scripting if we want to make the units do something more than just moving around.

I'm now testing if this solution has any limitations, bugs, issues, eg. leader behaviour etc

Edited by RazorX

Share this post


Link to post
Share on other sites

sqs...... why not sqf?

_unit doMove _position;
_unit enableAI "MOVE";
waituntil {unitready _unit or !(alive _unit)};
_unit disableAI "MOVE";

Share this post


Link to post
Share on other sites

You can use createAgent command.

From my testing i was able to spawn more than 144 units with this command.

But then again, maybe you can't because many commands do not work with "agents".

To me it looks like any command which uses also group reference, either to set or get some value, or to do something with a unit (but can be also used for a group), are not working.

But i can be mistaken, i tried only very few commands, and i have not done enough extensive testing yet.

Share this post


Link to post
Share on other sites
sqs...... why not sqf?

_unit doMove _position;
_unit enableAI "MOVE";
waituntil {unitready _unit or !(alive _unit)};
_unit disableAI "MOVE";

I've already tried that, it didn't work. Don't know why.

v 1.07

each time I was using waituntil, the script crashed or didn't really wait so I used SQS

Edited by RazorX

Share this post


Link to post
Share on other sites

What I've done to place units in buildings while keeping them as one group:

_unit doMove (_building buildingPos _index);
waitUntil {moveToCompleted _unit};
sleep .05;
doStop _unit;

You can make that as a generic move function and call it whenever you want to move the unit, though if you want to dynamically change the units destination this obviously needs a bit more work.

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  

×