Jump to content
Sign in to follow this  
sakura_chan

Copy and Pasting Playable Units and Setting Groups to Playable - Tutorial

Recommended Posts

I may not be a mission designer, but I am making an upgrade of sorts for the mission editor. One problem I found was that it is not possible by any means to copy and paste a unit while retaining its 'playable' condition. Also, laying down groups requires that each unit needs to be manually set as playable in the editor. I'm not sure if this has been suggested but I thought I would throw it out there anyways. Maybe sticky? This can save people a lot of time.

Individual Units

Place the unit to be copied. If copying the player, make one copy first and use that copy for the base.

unit1.jpg

Set up anything that you want applied to all the copied units

Make sure you DO NOT set it as 'playable' or 'player'

Set the "elevation" (or "Pos Z" in my mod) to a specific low height, I used 0.001

unit3.jpg

Copy and paste the units as you see fit, then save the mission.

unit2.jpg

Minimize A3, and open up the mission.sqm in notepad (or whatever you use). It would be a good idea to back it up at this point.

unit4.jpg

Using the 'replace' option, search for the elevation condition that you set for the units you want playable.

An elevation of 0.001 would be

offsetY=0.001;

replace it with

player="PLAY CDG";

Save the mission.sqm and reload it in A3

Any units that had an elevation of 0.001 are now playable and elevation is reset to 0

unit5.jpg

Groups

Same idea, but a little different for groups.

Place your group, set its direction to 0.001

group1.jpg

Don't rotate the group yet, keep it facing 0.001

group2.jpg

Save the mission, load it in notepad. Back it up.

group3.jpg

Using replace, find the azimut line for the group. A little weird, but it won't be exactly 0.001, here it is 0.00099999993

azimut = 0.00099999993;

Replace it with

player="PLAY CDG";

Save the mission and reload it in A3

group4.jpg

Any units that had a heading of 0.001 are now playable. Now you can rotate the group.

group5.jpg

Edited by Sakura_Chan

Share this post


Link to post
Share on other sites

Thats really neat.

Does anyone know: If you set a unit playable and during the mission the unit becomes non playable, if you can set it back as playable again? I think setPlayable is broken as far as I can see (unless Im using it wrong). I understand that if you didnt have the unit already set as playable at the beginning then it would be difficult to set up a new playable unit on a server (perhaps?) while its running. If however, it was playable at mission start, you would think it would be easy to reset it to playable again. This thread makes me wonder if its a variable somewhere that can easily be toggled back on.

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  

×