• 0

    posted a message on Working on Capture Point System

    @sorcelator: Go

    Part one:

    Part two:

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    New video up! Check it out.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @cptbuggernuts: Go

    Hey no problem! I've actually devised a much better way of doing this I believe. I'll explain here, and then see if it works later as I don't really have the time right now.

    This method will be a combination of the Data Editor and the Trigger Editor. Last night I was trying to find ways to do what I've done more efficiently. What I ended up with was a building that gave off an aura that granted a buff that did nothing. This buff would hit all units in the area. I had then created triggers to figure out if units had the buff. If they did, they activated triggers to gain score towards capturing the point.

    I thought about this for a moment, and realized IT WAS EXACTLY THE SAME AS BEFORE! Only thing now was I replaced the If Unit comes with in X range of Unit event with a periodic event that checked for buffs. So this was silly I thought, maybe using the data editor was dumb I thought. But then, as I was trying to fall asleep I had a brain storm.

    What I should be doing, is using the triggers that check for buffs AND the triggers to check for range. As well as making a building that grants an aura that the triggers check, I'm going to create unit buffs that do nothing that they have by defult. They will be called things like "Worth 1 Capture Point". So heres my plan:

    • Create a Variable to store the combined "worth" of units. This Variable will only have a number in it when units are in range. Maybe I could use an Array to store a value for each building, so that I don't need 5 Variables.
    • Create a Trigger that goes of anytime a unit enters the range of the capturable building. (copy this event for each building. This allows you to run the trigger every time some one comes in range of any of the capturable buildings)
      • This trigger then checks to see if:
        • This Unit Belongs to X player
        • This Unit has X Buff (this might be a bit redundant but I'll be necessary I think.)
          • Then I will check to see if this unit has X Tower Buff (then copy and paste this for each tower I have, changing the buff to that towers unique buff)
        • If all this holds true then it adds X to the Worth Variable (in a part of the array that is associated with the tower its in range of)

    Then, there will be a trigger that is always running. 5 of them to be exact. This trigger activates ever second and says this: (keep in mind I've never worked with Arrays so I'm not sure how this part will work)

    • Every Second Activate this trigger
    • Modify Variable +(X+0) (X in this trigger is the total worth of the units in the area. I'll just point this trigger to the part of the array that has the stored value of all units in the area.)
      • If: Variable = 20
      • Then Change Ownership to X player.
      • Else
        • If Variable = 0
        • Then Change Ownership for Y player

    I'll then have a trigger that does the reverse of the trigger that adds to the worth variable. That way, when players leave the area, or die they will remove they're worth from the pool and the capture will go slower.

    The Variable for Capture will start at 10. What this will do is this: Units will walk in to the area of a building. The game will add up all the buffs they have in to a Variable Array. (some units will be worth less then others. Players will be worth 1. Creep waves will be 1 divided by they're size, once I figure out how big they are. This way creep waves are worth 1 player at full strength.) That number is then added to the periodic event that adds points towards capturing a building. When nothing is in an area, the trigger adds +0.

    This leaves me with vary few triggers, BUT it also becomes really flexible in terms of what I can do. Once you have triggers set up for the buffs on the units you can change how much they're worth really easily in the triggers. If you need to add a location it'll be easy too. I'll make a video showing you how it CURRENTLY works, and then I'll make a video showing you how it works after I get what I just explained to work.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @sorcelator: Go

    BUMP! :3

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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).

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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:

    • 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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    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!

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    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!

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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.

    Posted in: Triggers
  • 0

    posted a message on Working on Capture Point System

    @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?

    Posted in: Triggers
  • To post a comment, please or register a new account.