Jump to content
Sign in to follow this  
iceman77

Setting Playable units (once)

Recommended Posts

Iam making c&h maps using one template. I copy and past units from one map to the next.There are alot of playable units.

Having to individually set each one to playable is time consuming.

Is there anyway to highlight a mess of soldiers and set them all to playable?I could go into the mission.sqm I suppose and do it that way but then im pretty much back to square 1 anyhow..

Share this post


Link to post
Share on other sites

No. There is no way to highlight them all and set playable, but that would make sense right!?

This has been a much asked and needed feature tool or what have you for the editor for a long time.

Only other way I can think of is you will need to script it,a dn I swear I seen a thread somewhere of

someone posting what you need to do to make mulitple units playable.

Share this post


Link to post
Share on other sites

sqm edit is the only way currently.

Share this post


Link to post
Share on other sites

if the purpose is to have them be available in single player just run this code from a init line of one of the units.

in this case it makes all West units playable:

_null = [] spawn {
sleep 1;
{
	if (side _x == west) then {addSwitchableUnit _x};
} foreach allUnits;
};

you can also do it with MP missions using "addPlayable _x" instead of "addSwitchableUnit _x", though i dont think they will be available in the MP briefing screen even if you run code from init.sqf.

Most likely you need to remove the sleep 1 line for MP in any case.

Share this post


Link to post
Share on other sites

Ye, I wish that was possible, either.

What I do is this:

I copy only the units that should be playable to the target mission, and save the mission.sqm (ideally, you keep the units in a separate template). Then I can open the new mission.sqm (that only consists of the units) in a text editor, hit "replace".

Find what: position[]=

Replace with: player="PLAY CDG"; position[]=

And there we go. Now I merge my other template with all the rest of the objects with my new mission.sqm.

It depends on how many units your template has. With about 10 units it is probably faster just to do a the klick-klick-klick in the editor.

But with 20+ units, you are faster the way described above.

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  

×