I used to make SC maps waaaaay back in the day and with the release of SC 2 I've decided to get back into it....
So I have my first noob question... I'm trying to set it up so that if a player kills an enemy unit the player gets some resources... I tried editing the units but couldn't find any option that looked like it would do it... and I also tried playing around with a trigger to see if there was a way to get it going in there... But as previously mentioned, I'm a noob...
It's called Kill Resource, and it's on each unit in the data editor, but it's in the advanced fields which you have to enable to see. I attached a picture with an arrow pointing to the advanced fields button. Hopefully that will help.
this can also be done through the trigger editor. You would want to do it this way if you wanted all units to give the same minerals, so you wouldn't have to edit each unit in the data editor.
Create a new trigger (Ctrl+T) Add an Event by right clicking events and clicking add element. Search for unit dies, select it and hit ok.
Then create a new action by right clicking actions and adding a new element. This time search modify player property. Click the linked 1 at the bottom and a window will come up. At the top choose funtion. Search for killing player. Choose and hit ok. Keep minerals the same (unless you want to give gas.) Click on Set To: and change it to add. Then click and change 1000 to whatever you want to gain per kill.
Basically what were doing is everytime a unit dies it gives the number chosen of minerlas to the killing player. Which obviously is the player who killed the unit.
Sometimes Unit Dies will produce an error depending on who or what killed the unit. You could use Unit takes Fatal Damage and reward the Damaging Player.
Wow, firstly thanks for all the really helpful replies, coming from playing WoW I was mostly expecting to get flamed hardcore for asking such a stupid question... but you guys all kick ass! ^_^
I'm going with changing the units in the data editor simply because there really isn't going to be too many units to my first map so it is quick and easy. :D
But I have more questions now! -_-' lol...
So... Two questions...
1. When the game starts my camera isn't set correctly, as player one I want it to start the camera in the top left (player two top right corner, p3 bottom left and p4 bottom right). Was thinking there might be a trigger like on game start move p1 cam here, p2 there, etc. But I also thought there might be an easier way? Perhaps some way of forcing the players cam to their starting location or something?
2. I'm trying to add a button to the players command centers so they can pay say 1000 minerals and instead of spawning marines around their base it starts spawning ghosts or something... I tried so #$&#*ing hard to get that working, tried adding upgrades, abilities, triggers, all kinds of stuff... But I fail >_< lol...
Also on a side note.... It may have just been because I was incredibly smashed but I couldn't find firebats in the editor?? Did they leave them out of SC 2? Or am I just a drunken idiot? ^_^ lol
Once again, thanks heaps for all the awesome replies, they really helped and I'm so glad I ended up on a decent sc 2 dev forum rather then some of the trash that I found... >_> ^_^ Have a really cute kitten as a thanks! :D
For number one, the easiest way i can think of is to make a region around where you want the camera to go and make a trigger for each player that sends the camera to each region on map initialization.
For number two, its a lot more complicated than you would think... You would have to make an upgrade and a trigger to do what you are planning. I'm doing something similar in one of my maps. You need to have a trigger check if the player has the building, and have it spawn units for that building. So if you have your first building Base 1 spawning marines, you want your trigger to check each player for having base 1. Have base 1 also as the start point for each player. Then you want the trigger to spawn the units at the start points every so often for the players that have base 1. Then base 1 would have the upgrade to base 2. You would have another trigger just like the one for base 1 but with ghosts checking if a player has base 2. Hope you can understand that.... Took me an hour to figure that out for my own map but I got it working perfectly.
The triggers will probably take you awhile to get working the way you want them to. I can't completely just hand you the triggers because then you won't learn anything from it. : P Good luck!
For the firebats, try going to file -> dependencies and turning on the campaign ones. They have a lot of extra stuff to work with so it might be in there.
Thanks ndudz, I've fixed the camera now (that was really easy ^_^) and I got the firebats working!! yay!! ^_^
As for the upgrade/unit change, I have decided to go with automatically upgrading the players units, I've set it up (and got it working) so that once a player hits a certain resource point it just starts making the new units. It was actually really easy... ^_^
But I've got another small (hopefully relatively simple) question... Is there a way to make an invisible wall that units can't pass through? Because where I have the units spawning I've made a little platform and put walls around it (found a sweet looking wall in the doodads) but the units walk straight through the walls... >_>
Also I promise I will eventually stop bugging you guys with questions... I feel like I'm being such a burden, everyone else is asking all these important and elite questions where as I'm sitting here going.... How do I build a wall? -_-'
On the plus side though all of you guys who have been helping me (and sc2 mapster) are going to be getting a special mention on my map! ^_^
Well, for the invisible wall, you can take a few approaches. You can use pathing blocker doodads (probably the easiest). You can make a region that when units move into it they are moved out to another region so they can reach the wall but never pass it. You can use the terrain editor to remove ground pathing for that area.
I'm trying to set it up so that if 3 of the 4 bunkers on my map are destroyed then it ends the game in victory for the person left alive... I'm pretty sure I've almost got it right, I've set 3 events for the bunkers dying, set the action to end the game in victory and I've added an and condition. My problem is I can't figure out what I need to put into the conditions (the and condition's.. conditions.... -_- lol) so that it won't end the game until all other bunkers are destroyed. So as soon as 1 of the bunkers goes boom the game ends in victory for the attacking player. -_- lol
I'm hoping there's just some easy little command I'm missing that simply tells my trigger all the events must happen before it goes off... But I doubt it... -_- lol
As per usual, all replies and help greatly appreciated! :)
Oh and if this makes no sense it's because I'm rushing this at work... If people are confused when I get home I'll rewrite it but slightly better... lol
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey everyone,
I used to make SC maps waaaaay back in the day and with the release of SC 2 I've decided to get back into it....
So I have my first noob question... I'm trying to set it up so that if a player kills an enemy unit the player gets some resources... I tried editing the units but couldn't find any option that looked like it would do it... and I also tried playing around with a trigger to see if there was a way to get it going in there... But as previously mentioned, I'm a noob...
HHEELLPP!! :( lol
It's called Kill Resource, and it's on each unit in the data editor, but it's in the advanced fields which you have to enable to see. I attached a picture with an arrow pointing to the advanced fields button. Hopefully that will help.
this can also be done through the trigger editor. You would want to do it this way if you wanted all units to give the same minerals, so you wouldn't have to edit each unit in the data editor.
Create a new trigger (Ctrl+T) Add an Event by right clicking events and clicking add element. Search for unit dies, select it and hit ok.
Then create a new action by right clicking actions and adding a new element. This time search modify player property. Click the linked 1 at the bottom and a window will come up. At the top choose funtion. Search for killing player. Choose and hit ok. Keep minerals the same (unless you want to give gas.) Click on Set To: and change it to add. Then click and change 1000 to whatever you want to gain per kill.
Basically what were doing is everytime a unit dies it gives the number chosen of minerlas to the killing player. Which obviously is the player who killed the unit.
Sometimes Unit Dies will produce an error depending on who or what killed the unit. You could use Unit takes Fatal Damage and reward the Damaging Player.
Wow, firstly thanks for all the really helpful replies, coming from playing WoW I was mostly expecting to get flamed hardcore for asking such a stupid question... but you guys all kick ass! ^_^
I'm going with changing the units in the data editor simply because there really isn't going to be too many units to my first map so it is quick and easy. :D
But I have more questions now! -_-' lol...
So... Two questions...
1. When the game starts my camera isn't set correctly, as player one I want it to start the camera in the top left (player two top right corner, p3 bottom left and p4 bottom right). Was thinking there might be a trigger like on game start move p1 cam here, p2 there, etc. But I also thought there might be an easier way? Perhaps some way of forcing the players cam to their starting location or something?
2. I'm trying to add a button to the players command centers so they can pay say 1000 minerals and instead of spawning marines around their base it starts spawning ghosts or something... I tried so #$&#*ing hard to get that working, tried adding upgrades, abilities, triggers, all kinds of stuff... But I fail >_< lol...
Also on a side note.... It may have just been because I was incredibly smashed but I couldn't find firebats in the editor?? Did they leave them out of SC 2? Or am I just a drunken idiot? ^_^ lol
Once again, thanks heaps for all the awesome replies, they really helped and I'm so glad I ended up on a decent sc 2 dev forum rather then some of the trash that I found... >_> ^_^ Have a really cute kitten as a thanks! :D
For number one, the easiest way i can think of is to make a region around where you want the camera to go and make a trigger for each player that sends the camera to each region on map initialization.
For number two, its a lot more complicated than you would think... You would have to make an upgrade and a trigger to do what you are planning. I'm doing something similar in one of my maps. You need to have a trigger check if the player has the building, and have it spawn units for that building. So if you have your first building Base 1 spawning marines, you want your trigger to check each player for having base 1. Have base 1 also as the start point for each player. Then you want the trigger to spawn the units at the start points every so often for the players that have base 1. Then base 1 would have the upgrade to base 2. You would have another trigger just like the one for base 1 but with ghosts checking if a player has base 2. Hope you can understand that.... Took me an hour to figure that out for my own map but I got it working perfectly.
The triggers will probably take you awhile to get working the way you want them to. I can't completely just hand you the triggers because then you won't learn anything from it. : P Good luck!
For the firebats, try going to file -> dependencies and turning on the campaign ones. They have a lot of extra stuff to work with so it might be in there.
Thanks ndudz, I've fixed the camera now (that was really easy ^_^) and I got the firebats working!! yay!! ^_^
As for the upgrade/unit change, I have decided to go with automatically upgrading the players units, I've set it up (and got it working) so that once a player hits a certain resource point it just starts making the new units. It was actually really easy... ^_^
But I've got another small (hopefully relatively simple) question... Is there a way to make an invisible wall that units can't pass through? Because where I have the units spawning I've made a little platform and put walls around it (found a sweet looking wall in the doodads) but the units walk straight through the walls... >_>
Also I promise I will eventually stop bugging you guys with questions... I feel like I'm being such a burden, everyone else is asking all these important and elite questions where as I'm sitting here going.... How do I build a wall? -_-'
On the plus side though all of you guys who have been helping me (and sc2 mapster) are going to be getting a special mention on my map! ^_^
@Corplex: Go
Well, for the invisible wall, you can take a few approaches. You can use pathing blocker doodads (probably the easiest). You can make a region that when units move into it they are moved out to another region so they can reach the wall but never pass it. You can use the terrain editor to remove ground pathing for that area.
Thanks happy, pathing blocker doodads have done the job nicely! :D
Hmm... next question....
I'm trying to set it up so that if 3 of the 4 bunkers on my map are destroyed then it ends the game in victory for the person left alive... I'm pretty sure I've almost got it right, I've set 3 events for the bunkers dying, set the action to end the game in victory and I've added an and condition. My problem is I can't figure out what I need to put into the conditions (the and condition's.. conditions.... -_- lol) so that it won't end the game until all other bunkers are destroyed. So as soon as 1 of the bunkers goes boom the game ends in victory for the attacking player. -_- lol
I'm hoping there's just some easy little command I'm missing that simply tells my trigger all the events must happen before it goes off... But I doubt it... -_- lol
As per usual, all replies and help greatly appreciated! :)
Oh and if this makes no sense it's because I'm rushing this at work... If people are confused when I get home I'll rewrite it but slightly better... lol