The map below has an example trigger that handles both of those cases using the trigger "Unit - Any Unit Shields changes."
General-If(Conditions)thendo(Actions)elsedo(Actions)If((Triggeringunit)Shields(Percent)(Current))==0.0ThenUI-Display"Shields are depleted."for(Allplayers)toSubtitleareaElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Triggeringunitpropertychange)>=0ThenUI-Display"Shields are regenerating."for(Allplayers)toSubtitlearea
I played around on a test map and it looks like the event you might have to use is "Unit - Any Unit Enters Region." As Verdagon stated, I wasn't able to get events to trigger for variable units/regions, only for ones premade on the map. There's a few options that I think you can do:
1. Create a premade region on your map. When you spawn a unit attach that region to the unit. When you use the "Unit - Any Unit Enters Region" for that region you can do your comparison to see which unit is stronger.
2. You said that this is like a board game, so you may already have the regions premade on your map. So just use the "Unit - Any Unit Enters Region" trigger and then count how many units are in the region to see if there are two that you need to compare.
3. In the data editor you can create a constant AoE damage effect on around each of your units that does zero damage. There is a trigger units taking damage and you can specify the type of damage to be your AoE, so that will trigger when they are close to eachother.
I attached a copy of an example of solution #1. You can also tweak it for #2, just don't attach the regions to your units. Hope this helps some.
Fixed AI bug where the AI would sometimes stop attacking when winning.
Fixed bug where armor upgrades were not counting towards Achievement Marines.
Changed the amount of marines that spawn per bunker so that they scale with how many bunkers are on the map. They will increment from a max of 50 per bunker and change to a max of 25 per bunker once there are more than 55 bunkers on the map. This dramatically reduces unit count in game and thus dramatically reduces lag in late game. Tweaks will be made if balance is thrown off too much because of this.
If anyone gets a chance to, please try this map out (if you haven't already), I'd very much appreciate your input! I haven't gotten much feedback recently and I want to make sure that I'm on the right track. Thanks! :)
I'm not sure about your revealer overriding the other revealer problem, but as for referring to a newly created region. I couldn't find a "Last Created Region" so I think your best option is to just combine them in one line something like this:
I'll post back here if I think of anything for the revealers.
Edit:
I tried to use regions with negative space inside, but the revealer still does the entire region (ignoring the negative space). So I've run out of trigger ideas on this one.
Fixed some bugs and added some new features that should add more variety to the game! Check them out:
Version 1.12
Added back in the ability to salvage bunkers. Salvaging will return 100 minerals to the player.
Added a dialog box at the top of the screen so that players can more easily track how many minerals they need for their next Bunker Dispenser.
Fixed a trigger error with the AI that happened when they finished a player off.
New Feature!
Players can now change the map size! Game Options will appear at the beginning of the game allowing players to vote for map size and choose AI difficulty, if applicable. Players can choose between:
Here ya go, I added in that catalog action I mentioned earlier. Since the Phoenix was the only unit you had on your map example, I had it speed up and slow down them when you raise/lower the supply depots. This should give you a better understanding of how it works though. But please feel free to ask more questions if you need.
So that action requires you to enter in the names as a string. So
Entry = "Overlord"
Field Path = "Speed"
Value = "1.75" (Or whatever number you'd like, but it must be a string as well, so you can use the Real to String function if you have this speed saved as a variable or something)
And yea, I agree with you, the Galaxy Editor can be a strange and confusing place, but hang in there! :)
My mistake, I guess I should have called it an Action and not a trigger.
Its listed as "Catalog Field Value Set" in the Actions list.
Edit:
I was also looking, and there's another action called "Set Unit Property" where you could use:
Unit-Set(Triggeringunit)MovementSpeedto100.0
But I think you'd have to do this for every individual unit. My original idea does it for that unit type. So I'm not sure which one will work better for your situation.
Can you copy and paste your wave triggers? I'm thinking that there might be something off with your conditions, but its hard to tell for sure for me anyway.
My Speed array was usually adding or subtracting .5 to the Overlord's base speed. So if you wanted you could replace "String(((Overlord Movement Speed) + Speed[0])) with 2 decimal places" with "1.5" or whatever speed you want I believe. Sorry its been a while since I've dived into this trigger :)
0
The map below has an example trigger that handles both of those cases using the trigger "Unit - Any Unit Shields changes."
I hope this helps!
0
I played around on a test map and it looks like the event you might have to use is "Unit - Any Unit Enters Region." As Verdagon stated, I wasn't able to get events to trigger for variable units/regions, only for ones premade on the map. There's a few options that I think you can do:
1. Create a premade region on your map. When you spawn a unit attach that region to the unit. When you use the "Unit - Any Unit Enters Region" for that region you can do your comparison to see which unit is stronger.
2. You said that this is like a board game, so you may already have the regions premade on your map. So just use the "Unit - Any Unit Enters Region" trigger and then count how many units are in the region to see if there are two that you need to compare.
3. In the data editor you can create a constant AoE damage effect on around each of your units that does zero damage. There is a trigger units taking damage and you can specify the type of damage to be your AoE, so that will trigger when they are close to eachother.
I attached a copy of an example of solution #1. You can also tweak it for #2, just don't attach the regions to your units. Hope this helps some.
0
Versions 1.14 - 1.16
Fixed AI bug where the AI would sometimes stop attacking when winning.
Fixed bug where armor upgrades were not counting towards Achievement Marines.
Changed the amount of marines that spawn per bunker so that they scale with how many bunkers are on the map. They will increment from a max of 50 per bunker and change to a max of 25 per bunker once there are more than 55 bunkers on the map. This dramatically reduces unit count in game and thus dramatically reduces lag in late game. Tweaks will be made if balance is thrown off too much because of this.
0
If anyone gets a chance to, please try this map out (if you haven't already), I'd very much appreciate your input! I haven't gotten much feedback recently and I want to make sure that I'm on the right track. Thanks! :)
0
@Claymuffin: Go
Like I posted above:
Unless I'm missing something in your problem, this will create a region and set it to your "Scrambled Region" variable.
0
@BallsButNoSack: Go
Page not found! :(
0
I'm not sure about your revealer overriding the other revealer problem, but as for referring to a newly created region. I couldn't find a "Last Created Region" so I think your best option is to just combine them in one line something like this:
I'll post back here if I think of anything for the revealers.
Edit:
I tried to use regions with negative space inside, but the revealer still does the entire region (ignoring the negative space). So I've run out of trigger ideas on this one.
0
I just added a new trailer for this map, check it out!
0
Just added a new trailer for this map!
0
Fixed some bugs and added some new features that should add more variety to the game! Check them out:
Version 1.12
Added back in the ability to salvage bunkers. Salvaging will return 100 minerals to the player.
Added a dialog box at the top of the screen so that players can more easily track how many minerals they need for their next Bunker Dispenser.
Fixed a trigger error with the AI that happened when they finished a player off.
New Feature!
Players can now change the map size! Game Options will appear at the beginning of the game allowing players to vote for map size and choose AI difficulty, if applicable. Players can choose between:
0
Here ya go, I added in that catalog action I mentioned earlier. Since the Phoenix was the only unit you had on your map example, I had it speed up and slow down them when you raise/lower the supply depots. This should give you a better understanding of how it works though. But please feel free to ask more questions if you need.
0
@strhsxx: Go
So that action requires you to enter in the names as a string. So
Entry = "Overlord" Field Path = "Speed" Value = "1.75" (Or whatever number you'd like, but it must be a string as well, so you can use the Real to String function if you have this speed saved as a variable or something)
And yea, I agree with you, the Galaxy Editor can be a strange and confusing place, but hang in there! :)
0
@strhsxx: Go
My mistake, I guess I should have called it an Action and not a trigger.
Its listed as "Catalog Field Value Set" in the Actions list.
Edit:
I was also looking, and there's another action called "Set Unit Property" where you could use:
But I think you'd have to do this for every individual unit. My original idea does it for that unit type. So I'm not sure which one will work better for your situation.
0
@littlefury916: Go
Can you copy and paste your wave triggers? I'm thinking that there might be something off with your conditions, but its hard to tell for sure for me anyway.
0
This is a trigger that I've used before to increase/decrease unit speed.
My Speed array was usually adding or subtracting .5 to the Overlord's base speed. So if you wanted you could replace "String(((Overlord Movement Speed) + Speed[0])) with 2 decimal places" with "1.5" or whatever speed you want I believe. Sorry its been a while since I've dived into this trigger :)