I'm still a pretty big noob to the editor, I haven't made a custom map since SC1 and that was YEARS ago. I know how to create a unit that can be captured when other units are in proximity, what I would like to learn next is how to delay that capture, display a timer indicating how long the capture will take, and also how to create a score that goes up the longer you hold the captured unit.
Once I get this road block out of the way it'll be much easier to move forward with my map idea. Any tips would be great! Thanks in advance!
Ok, So I've figured out how to capture a building with proximity and have it delay the capture by a set time. What I need to figure out is how to make it so a score ticks up for holding that unit and have it stop when you don't own it. Any tips would be nice!
You could make it put an effect/behavior on your units, and have a trigger that checks for that every 5 or 10 seconds on every player. Whoever has the buff gets + score, the people who dont have it wont get + score.
you know, I didn't even know that there was a function for a Score. I actually made it effect minerals, but a Score would be much nicer.
EDIT
After looking around I'm still unsure as to how you would do that. Should I make a new score type? If so what should the settings be? If not, what should I set the score to?
Ok that makes more sense. But this opens more questions! When I was just adding minerals It was pretty easy to figure out the win condition code, but now I'm at a loss. I'd like the game to end when the score reaches a set number. Also Displaying the score on a leaderboard isn't something I'm to familiar with.
Ok so I've got my map set up now with 5 points to capture. Each point starts as a neutral powered down Fleet Beacon. When you stand a unit with in 3 units from the structure you get a count down timer. When that timer expires the Fleet Beacon is transfered the Power Supply (or whatever its called) behavior from a pylon on the map (this way it makes the powering up sound, and changes its visual state.) And its ownership is transfered over to that player. This works for each of the control points perfectly. When you capture a control point it runs a trigger that does a periodic event that adds a Real Number to a variable. Now this is where I'm stuck:
I have a leader board, but I'm unsure as how to put it together. I'd like to have the Teams Name (in the final version it'll be Red vs Blue with each player on there own teams, like dota) and a progress bar that slowly fills up to the victory amount. But I can't get any of that to work right. Also as a future note, I'd like to move away from the count down timer, and create a system where more units at a capture point captures it faster, and enemy units in the area force it to capture slower (if say 2 blue players and 2 red players are in the area they should cancel each other out and stale mate the capture. More blue players will push it to them capturing but it'll be slower with players around). Any tips would be great!
After some snooping I figured out how to get the leaderboard to work at a basic level. What I'd like to do next though is instead of a number based leaderboard I'd want to use a Progress Bar to indicate how close some one is to winning. I'll play around with it some more and see what I can turn up, but if anyone has any tips drop a line here!
Ok it looks like I'm really getting the hang of this now. All of this was built with one player in mind though, now I'm going to have to try and add a second player in to see how this would all play out with two players. I keep forgetting about Periodic Events and how useful they can be. My win condition just checks ever .1 seconds to see if the score is = to 500 and it works like a charm. I'll post a video up soon to show you guys how it works.
Nice! I am in need of a similar mechanic (but I'm even more inexperienced with coding!) Instead of a score, my buildings (Xel'Naga watchtowers) will feed Minerals to the controller. First team to 5000 (or whatever) minerals wins.
If you could post how you got your capture mechanic to work I would greatly appreciate it!
After some fiddling around I came up with a system that can stalemate a capture if two people are at the tower, it can easily be adapted to add minerals. Thats what the first version of my map did to be honest. Now though, score seems more practical and I can do a lot more with it. But if you want to keep it simple the best way to make what you want happen is to have an event trigger when a unit comes with in a range of a tower. Once you get one trigger like that working you can copy it and change the target of the tower you need to be in range off.
One thing though that was really tossing me for a loop was making it be more specific about the unit that triggers the event. I ended up creating variables that were set to "Unit Group" and named them Team 1 and Team 2. In the starting triggers for my map I added the SCV's (the only controlled unit in my map so far) to the Unit Group's.
If you'd like to look at my map I've posted it as an attachment. Each folder contains all the triggers needed to capture a structure on my map. The Resource can be changed to minerals instead of modding the variable I have set. This system though creates a push and pull mechanic at the towers. Right now it just stalemates because there is only one player on each team. My next goal is to try and make it so that the red and blue teams are not controlled by players, and create units for players to control that are not of those team colors.
This I need to do for my next update:
Create Player Units
Use Player Units to capture buildings for Red Team
Make multiple units capture a point faster
Try and condense my triggers
I worry that I'll have to copy everything I have right now in my triggers for Red and Blue for each player in the game. Right now Each one of these nodes has identical triggers save for the nodes that are being effected. If there was a way to make a general trigger that worked for each node that would be awesome, but I have no idea where to even begin to make something like that. If some one with a little more knowledge wants to take a look at my map and give me some pointers as to how I can make this more efficiently that would be awesome! I'll make a video showcasing what I've changed so far.
Looking at what you put for the trigger finding the area, I think I may have a solution
Create Two triggers, with the
action
ANY unit enters region (selected region [example capture point 1])
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 3])
condition
Unit is owned by (select player [example 1])
Unit is owned by (select player [example 2])
Unit is owned by (select player [example 3])
then do actions
the second trigger
action
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 3])
condition
Unit is owned by (select player [example 4])
Unit is owned by (select player [example 5])
Unit is owned by (select player [example 6])
then do actions
where the player number is equivalent to the player number for each team
and the selected region is each capture region (you may have to have an additional condition to check whether its active)
I'll take a look in more detial when I get home from work but this is just a rough idea
I don't know if that would work. The conditions would make it so they all have to be met, unless I wrapped each one in an OR statement.
EDIT:
After looking at the editor I can kinda see how that would work. I didn't realize for whatever reason that I could put more then one event to trigger one action. I would have to find a way for it to know which area it enters though. I get the feeling that there is going to be a lot of IF THAN ELSE statements inside a single trigger like this. Not that its a bad thing really. I would have to pretty much recode everything (kinda).
Heres my first video if anyone wants to watch it in 1080p
Question to people who post videos on youtube: What program do you use? My current program works OK, but it has awful frame rate and the colors are all really bad. Also I've been using WLMM To edit my movies down to a normal size, but it seems to put big black bars around my video on youtube, any idea how I can fix this? Maybe I should be using a different program.
I'm still a pretty big noob to the editor, I haven't made a custom map since SC1 and that was YEARS ago. I know how to create a unit that can be captured when other units are in proximity, what I would like to learn next is how to delay that capture, display a timer indicating how long the capture will take, and also how to create a score that goes up the longer you hold the captured unit.
Once I get this road block out of the way it'll be much easier to move forward with my map idea. Any tips would be great! Thanks in advance!
@sorcelator: Go
Ok, So I've figured out how to capture a building with proximity and have it delay the capture by a set time. What I need to figure out is how to make it so a score ticks up for holding that unit and have it stop when you don't own it. Any tips would be nice!
@sorcelator: Go
You could make it put an effect/behavior on your units, and have a trigger that checks for that every 5 or 10 seconds on every player. Whoever has the buff gets + score, the people who dont have it wont get + score.
Help?
For the Score, why dont you turn on a periodic trigger (based on which player captures it) that adds score to that player.
@RockJohnAxe: Go
you know, I didn't even know that there was a function for a Score. I actually made it effect minerals, but a Score would be much nicer.
EDIT After looking around I'm still unsure as to how you would do that. Should I make a new score type? If so what should the settings be? If not, what should I set the score to?
@sorcelator: Go
by score i meant a variable
@RockJohnAxe: Go
Ok that makes more sense. But this opens more questions! When I was just adding minerals It was pretty easy to figure out the win condition code, but now I'm at a loss. I'd like the game to end when the score reaches a set number. Also Displaying the score on a leaderboard isn't something I'm to familiar with.
Ok so I've got my map set up now with 5 points to capture. Each point starts as a neutral powered down Fleet Beacon. When you stand a unit with in 3 units from the structure you get a count down timer. When that timer expires the Fleet Beacon is transfered the Power Supply (or whatever its called) behavior from a pylon on the map (this way it makes the powering up sound, and changes its visual state.) And its ownership is transfered over to that player. This works for each of the control points perfectly. When you capture a control point it runs a trigger that does a periodic event that adds a Real Number to a variable. Now this is where I'm stuck:
I have a leader board, but I'm unsure as how to put it together. I'd like to have the Teams Name (in the final version it'll be Red vs Blue with each player on there own teams, like dota) and a progress bar that slowly fills up to the victory amount. But I can't get any of that to work right. Also as a future note, I'd like to move away from the count down timer, and create a system where more units at a capture point captures it faster, and enemy units in the area force it to capture slower (if say 2 blue players and 2 red players are in the area they should cancel each other out and stale mate the capture. More blue players will push it to them capturing but it'll be slower with players around). Any tips would be great!
After some snooping I figured out how to get the leaderboard to work at a basic level. What I'd like to do next though is instead of a number based leaderboard I'd want to use a Progress Bar to indicate how close some one is to winning. I'll play around with it some more and see what I can turn up, but if anyone has any tips drop a line here!
Ok it looks like I'm really getting the hang of this now. All of this was built with one player in mind though, now I'm going to have to try and add a second player in to see how this would all play out with two players. I keep forgetting about Periodic Events and how useful they can be. My win condition just checks ever .1 seconds to see if the score is = to 500 and it works like a charm. I'll post a video up soon to show you guys how it works.
http://www.wegame.com/watch/capture-point-system-in-sc2/ Video Up!
NEVERMIND I FIXED IT GOSH IM DUMB! Anyway I now have a new question! How do I get a timer to show up for only ONE player.
Nice! I am in need of a similar mechanic (but I'm even more inexperienced with coding!) Instead of a score, my buildings (Xel'Naga watchtowers) will feed Minerals to the controller. First team to 5000 (or whatever) minerals wins.
If you could post how you got your capture mechanic to work I would greatly appreciate it!
Good luck to you!
@Purgatus: Go
After some fiddling around I came up with a system that can stalemate a capture if two people are at the tower, it can easily be adapted to add minerals. Thats what the first version of my map did to be honest. Now though, score seems more practical and I can do a lot more with it. But if you want to keep it simple the best way to make what you want happen is to have an event trigger when a unit comes with in a range of a tower. Once you get one trigger like that working you can copy it and change the target of the tower you need to be in range off.
One thing though that was really tossing me for a loop was making it be more specific about the unit that triggers the event. I ended up creating variables that were set to "Unit Group" and named them Team 1 and Team 2. In the starting triggers for my map I added the SCV's (the only controlled unit in my map so far) to the Unit Group's.
If you'd like to look at my map I've posted it as an attachment. Each folder contains all the triggers needed to capture a structure on my map. The Resource can be changed to minerals instead of modding the variable I have set. This system though creates a push and pull mechanic at the towers. Right now it just stalemates because there is only one player on each team. My next goal is to try and make it so that the red and blue teams are not controlled by players, and create units for players to control that are not of those team colors.
This I need to do for my next update:
I worry that I'll have to copy everything I have right now in my triggers for Red and Blue for each player in the game. Right now Each one of these nodes has identical triggers save for the nodes that are being effected. If there was a way to make a general trigger that worked for each node that would be awesome, but I have no idea where to even begin to make something like that. If some one with a little more knowledge wants to take a look at my map and give me some pointers as to how I can make this more efficiently that would be awesome! I'll make a video showcasing what I've changed so far.
@sorcelator: Go
Looking at what you put for the trigger finding the area, I think I may have a solution
Create Two triggers, with the
action
ANY unit enters region (selected region [example capture point 1])
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 3])
condition
Unit is owned by (select player [example 1])
Unit is owned by (select player [example 2])
Unit is owned by (select player [example 3])
then do actions
the second trigger
action
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 2])
ANY unit enters region (selected region [example capture point 3])
condition
Unit is owned by (select player [example 4])
Unit is owned by (select player [example 5])
Unit is owned by (select player [example 6])
then do actions
where the player number is equivalent to the player number for each team
and the selected region is each capture region (you may have to have an additional condition to check whether its active)
I'll take a look in more detial when I get home from work but this is just a rough idea
@Cerosia: Go
I don't know if that would work. The conditions would make it so they all have to be met, unless I wrapped each one in an OR statement.
EDIT: After looking at the editor I can kinda see how that would work. I didn't realize for whatever reason that I could put more then one event to trigger one action. I would have to find a way for it to know which area it enters though. I get the feeling that there is going to be a lot of IF THAN ELSE statements inside a single trigger like this. Not that its a bad thing really. I would have to pretty much recode everything (kinda).
@sorcelator: Go
Video going up!
Its still processing as of this post. Also I recorded this like 5 times last night, really really late, I was super tired! haha.
Edit: 2 hours later and its still processing? LAME! I'll check it when I get out of work, and if its still not done I'll try and reupload it.
Edit2: Ok so it looks like I can upload videos over 10 min on youtube! So I'm just going to post them up over there.
@sorcelator: Go
BUMP! :3
@sorcelator: Go
Heres my first video if anyone wants to watch it in 1080p
Question to people who post videos on youtube: What program do you use? My current program works OK, but it has awful frame rate and the colors are all really bad. Also I've been using WLMM To edit my movies down to a normal size, but it seems to put big black bars around my video on youtube, any idea how I can fix this? Maybe I should be using a different program.
i've been working on something similar for the last week, thanks for the vids mate. you're officially my hero :D