I'm working a single player campaign and just like we all do I have faced problems and I want to write about how I'm solving them. I'm also doing my best to do actual tutorials about solved problems. This thread works also as a link thread to my other tutorials and other good tutorials I have found useful. Hope this thread helps people to find easy and fast answers for common problems. To understand some things better I recommend you to check my campaign and download files for inspect. You can use all triggers etc. from my maps as you want. My project: http://www.sc2mapster.com/maps/custom-campaign-initiative/pages/hand-of-humanity-campaign/ If you want to ask something I'm willing to help with basic things.
When player destroys any of computer's buildings computer rebuilds it with SCV. By using "Set the general rebuild count" trigger. Look at picture "Rebuild" at end of post.
How to do "rescuable" units (own unit moves close to it and player gains control of it) Look at picture "Rescue" at end of post. Notice this is only one way to do it - just be creative, you can use any type of event that rescues unit for you. Use "Region" tool (R) to do regions.
How to hide map area (So that player doesn't see whole map at beginning) That was simple. Click Map - Map info. Choose "Black mask" to Unexplored Areas. "Grey mask" is default value.
How to restrict production of some units/structures (for example so that player can't build Battlecruisers) using "Disallow" trigger. Look at picture Disallows / Upgrades at end of post.
How to give upgrades to current units. Look at picture Disallows / Upgrades at end of post. Notice that you have to put all 3 levels as in picture for level 3 upgrades.
When map starts how I set camera to right place. Mini tutorial: Click camera icon or press C. Press Ctrl+Shift+C to reset camera to default game view. Now go to that location what you want to see when map begins. Click "Create camera" and name it to "Starting View". Do a trigger like in picture "Camera" at end of post.
When player wins / loses map how to load next map. Use "Set next map" trigger. It works only for local files and these files have to be in Startcraft II\Maps folder. If you use mod it needs to be in Mod folder and your map need to to use this as a dependency. (File - Dependencies...)
Try CTRL and Shift in many situations. By golding Shift you can place a tree in canyon for example. By holding CTRL you can place units and doodads easily middle of any square.
Placement grid is useful. Select: View - Show placement grid.
Press V to change between gameplay and editor view.
sorry almost moved your thread to map development forum. If you want to write a tutorial for your solved problem, you can start now. Please ask help from map development thread. Dont have to be seperate thread, put all of your unsolved on 1 thread. And please be more specific
There is an action called Rescue Unit and Rescue Group of Units you can use. If they are in a fixed place, use an Any Unit Enter Region event. If not you'll need to be more creative, and check for proximity or something like that.
About the restrict part, what do you really want? Make some units impossible to build, or have a maximum number of units/building of that type?
•How to hide map area (Now player sees whole map at beginning) -> Probably you wanna change the map properties to black mask.
•How to give upgrades to current units such as Stimpack for Marines -> Do you mean it doesn't need to research Stim Pack? Delete all the requirements for the skill in the data editor.
I probably misunderstood what you're asking but I'm going to try and answer.
If you don't want the player to be able to build battecruisers: Data->Units->Starport-> Ability - Command Card + -> click on the battlecruiser icon delete.
If the stimpak doesn't show on the command card then maybe you deleted it from Abilities?
Take a look at the Command Card of the Marine, probably Stim Pack has some kind of requirement you can delete. Or you can add it again if doesn't show.
If you want that no one can build Battlecruiser, i think there is an action called Disallow "type of unit". Use it at the start of the game for every player.
The same way you can keep a counter of Medics in play, if that number is >=10, you can Disallow that unit, and allow it again when the number is <10. Probably will not work well with queued units, but is worth a try.
I think you can use too Add Upgrade Level For Player for giving any upgrade to a player via triggers.