If I'm understanding this correctly, the dialog button needs the (Used Dialog Button) = Riflebutton condition and the button press needs to Currentweapon != 1 condition? What you can do is have one trigger call another trigger. (wording may be off as I'm speaking from memory, not looking at the editor):
1. Check the behaviors of the Mineral Field unit object. One of the behaviors has a field that will allow you to harvest 2 minerals instead of the standard 5 per harvest.
Yes, many triggers with the same event and different conditions will generate lag. Can you not specify the variable in the event? If not, you can create a single trigger with the event and then place a switch statement in the action. Each case of the switch statement would start an action definition. I'm not looking at the editor right now, but it would look something like:
eventAnyKeyisPressedactionsswitch(pressed_key)//I assume that you can find the key that was pressed in the action.case'left_btn': left_is_pressed()case'right_btn': right_is_pressed()case'forward_btn': forward_is_pressed()
left_btn is referring to your variable and left_is_pressed() refers to the names of action definitions that you define.
if its not working then just set the action to "Any unit is selected by Any Player" and make a condition for it "Triggering Unit = Example_Unit"
Yes, this is the work-around, however, it still increases lag due to checking every time a unit is selected. It would help on lag if this event was fixed to trigger only when it's supposed to.
The Event "Unit Is Selected" has a field so that it should only activate when a particular unit is selected, however, it will activate for Any Unit no matter what. In the below example, the trigger activates when any unit is selected, not just the Example_Unit.
1) Duplicate a Mineral Field unit and Minerals (Mineral Field) behavior.
2) Make sure that your duplicated Minerals (Mineral Field) is attached to the Behaviors+ field and not the original behavior.
3) In the duplicated Minerals (Mineral Field) behavior, remove the Carry Resource Behavior field.
4) Adjust to Amount and Capacity fields to however many times it should take for a worker to remove a particular mineral field. If the mineral field needs to be mined 20 times before it is removed, then adjust it to 20.
5) Change the Harvest Amount to 1.
6) Place your duplicated unit on the map, you only need to place 1 per location.
I'm scared for downloading the patch now. I JUST edited all of my units yesterday and it took all day. -.-' I was only dealing with triggers and terrain up until yesterday and I'd rather not have to edit the units a second time the day after I edited the units. :-/
There is also a limit of 32 abilities that can be added to a single command card, so keep this in mind. I found this out the hard way by needing 33 abilities (ONE above the max). You can spread the abilities to the various command cards, however. 3 command cards containing 11 abilities each (33 abilities total) works while 1 command card containing 33 abilities will not work.
If you find that you still need more space, a suggestion might be to create a do-nothing ability (of type effect-instant) and then have a trigger activate whenever the do-nothing ability is used that will select another (possibly invisible) unit that has high selection priority so you have access to the other unit's command card without deselecting your current unit. When you hit the 'cancel' button, it should deselect the unit so that you're back to your previous unit selection again.
I had a similar issue where I wanted a structure to build based upon the player's race, which they select at start up. The workaround that I used was that I put a research upgrade requirement on every ability. At game initialization, I researched the upgrades for the players depending on their race with a trigger. So for me, I had the requirements "is Terran", "is Protoss", and "is Zerg". For you, you'd need the requirements "is Player 1", "is Player 2", ect.
In the data editor, you can turn each individual structure to not display in the fog of war, thus it won't know if there is a building there or not when you go to queue a building. In either case, I believe you can set stacking limits on the build ability, so turning lights off/on is unnecessary.
If the only reason you won't use if-then-else is because you'll have a giant trigger, then I'd suggest making an action definition for each unit and in the trigger that has the event, make a single switch statement that will call the appropriate action definition. In case you're not familiar with switch statements, they are identical to if-then-else statements, except that they only compare one value - in this case, you only need to compare the unit type of the triggering unit. Here's what it might look like if applied to the Marine and Zergling. Let me know if you have any questions, there are 1 trigger and 2 action definitions:
0
If I'm understanding this correctly, the dialog button needs the (Used Dialog Button) = Riflebutton condition and the button press needs to Currentweapon != 1 condition? What you can do is have one trigger call another trigger. (wording may be off as I'm speaking from memory, not looking at the editor):
0
There's also the Mutalisk's ability, which is essentially Chain Lightning.
0
1. Check the behaviors of the Mineral Field unit object. One of the behaviors has a field that will allow you to harvest 2 minerals instead of the standard 5 per harvest.
0
Yes, many triggers with the same event and different conditions will generate lag. Can you not specify the variable in the event? If not, you can create a single trigger with the event and then place a switch statement in the action. Each case of the switch statement would start an action definition. I'm not looking at the editor right now, but it would look something like:
left_btn is referring to your variable and left_is_pressed() refers to the names of action definitions that you define.
0
Yes, this is the work-around, however, it still increases lag due to checking every time a unit is selected. It would help on lag if this event was fixed to trigger only when it's supposed to.
0
The Event "Unit Is Selected" has a field so that it should only activate when a particular unit is selected, however, it will activate for Any Unit no matter what. In the below example, the trigger activates when any unit is selected, not just the Example_Unit.
Steps to reproduce:
0
Change it from targeting an item to targeting a unit. Mineral Fields are considered structures and thus units.
0
It's not using the editor in creative ways. It's using the editor exactly how particular functions were intended to be used.
0
I believe what you need to do is:
1) Duplicate a Mineral Field unit and Minerals (Mineral Field) behavior.
2) Make sure that your duplicated Minerals (Mineral Field) is attached to the Behaviors+ field and not the original behavior.
3) In the duplicated Minerals (Mineral Field) behavior, remove the Carry Resource Behavior field.
4) Adjust to Amount and Capacity fields to however many times it should take for a worker to remove a particular mineral field. If the mineral field needs to be mined 20 times before it is removed, then adjust it to 20.
5) Change the Harvest Amount to 1.
6) Place your duplicated unit on the map, you only need to place 1 per location.
0
I'm scared for downloading the patch now. I JUST edited all of my units yesterday and it took all day. -.-' I was only dealing with triggers and terrain up until yesterday and I'd rather not have to edit the units a second time the day after I edited the units. :-/
0
Hack
Virus
Trojan
Firewall
Repair
Data Corruption
Bypass Security
Critical Error
Bug(s)
(System) Restore
(System) Reboot
(System) Malfunction
Overload
Overheat
Thread
Download
Upload
Elmo
Burn
Melt
250mm Cannons
Up to you what these abilities actually do.
0
@Antimatterthunder: Go
There is also a limit of 32 abilities that can be added to a single command card, so keep this in mind. I found this out the hard way by needing 33 abilities (ONE above the max). You can spread the abilities to the various command cards, however. 3 command cards containing 11 abilities each (33 abilities total) works while 1 command card containing 33 abilities will not work.
If you find that you still need more space, a suggestion might be to create a do-nothing ability (of type effect-instant) and then have a trigger activate whenever the do-nothing ability is used that will select another (possibly invisible) unit that has high selection priority so you have access to the other unit's command card without deselecting your current unit. When you hit the 'cancel' button, it should deselect the unit so that you're back to your previous unit selection again.
0
@Anarcy: Go
I had a similar issue where I wanted a structure to build based upon the player's race, which they select at start up. The workaround that I used was that I put a research upgrade requirement on every ability. At game initialization, I researched the upgrades for the players depending on their race with a trigger. So for me, I had the requirements "is Terran", "is Protoss", and "is Zerg". For you, you'd need the requirements "is Player 1", "is Player 2", ect.
0
@7MM3: Go
In the data editor, you can turn each individual structure to not display in the fog of war, thus it won't know if there is a building there or not when you go to queue a building. In either case, I believe you can set stacking limits on the build ability, so turning lights off/on is unnecessary.
0
@Naim2k10: Go
If the only reason you won't use if-then-else is because you'll have a giant trigger, then I'd suggest making an action definition for each unit and in the trigger that has the event, make a single switch statement that will call the appropriate action definition. In case you're not familiar with switch statements, they are identical to if-then-else statements, except that they only compare one value - in this case, you only need to compare the unit type of the triggering unit. Here's what it might look like if applied to the Marine and Zergling. Let me know if you have any questions, there are 1 trigger and 2 action definitions: