Ohhh, I was thinking that each time the trigger ran the variables would be reset back to zero. I didn't realize they kept their value.
I understand now. You've been extremely helpful, thanks.
BTW, I'm not actually going to run the trigger every second, that was just a rough estimate of how often I think it would be used. It's an 8-player tower defense map, so everybody would be putting units in bunkers at the same time after a wave.
I've decided to only have 4 units for the bunkers instead of 5, so that means 20 color combinations. I also realized that if you put a marauder in a bunker, you're not going to be able to have a marine/hydralisk combo, so I'll only need 6 switch actions each time a unit is loaded.
Would running a trigger with 6 switch actions every second make the map very laggy?
You could add additional move orders to the trigger. Make a point in the correct lane near the base and order the units to move to that point, then move to the destination using "after existing orders" instead of "replace existing orders."
The problem is I want to add tint rather than set it. Somebody puts a marauder in a bunker, that turns it red. After that, if they put a Marine in the same bunker, I want it to add blue tint to turn it purple. With your method it would just make the bunker red when a marauder enters, then turn it blue when a marine enters. I need to be able to get the current tint so I can add to that - so if a marauder is in a bunker, that sets the tint to 50% 0% 0%, and then if a marine enters, instead of setting it to 0% 0% 50%, it would get the current tint (50% 0% 0%) and add 50% to the red, making it purple.
Edit 2:
Another way to do it would be to simply check "if marine" "if marine marauder" "if marauder" "if empty" (using a few more variables in the switch), and then set the colors to exactly what you want in another switch... depending, of course, on how many different unit combinations are possible in your map.
I could do this, but as I said, there are 30 possible color combinations - wouldn't that make the map laggy? It's going to be a maze defense map where you build bunkers (which have a 1x1 footprint) and then build units inside of them, so the trigger would be running a lot.
I'm trying to make it so bunkers are tinted a certain color if a certain type of unit is loaded into them. For example: if marines are blue and marauders are red, then a bunker with one marine and one marauder would be purple, or a bunker with two marines would be blue, etc.
The problem is I need to add tint to a bunker when a marine is loaded into it, rather than set the tint of it. Here's what I have so far:
Events
Unit - Any Unit Loads Cargo
Conditions
(Unit Type of (Triggering Cargo Unit)) == Marine
Actions Send Actor Message To Unit
Message: Set Tint Color
- Color: Convert Reals To Color With Alpha
- - Red: Arithmetic (Real)
- - - Value 1: Absolute Value (Real)
- - - - ?????
- - - Operator: +
- - - Value 2: 1.0
- - Green: 100.0%
etc.
This is where I'm having problems. I want to get the current percentage of red tint on the bunker and add to that. I've tried everything I could think of and nothing has worked.
Bunkers can only load two units in my map, so I suppose I could just make 30 triggers for all of the color combinations, but wouldn't that make my map laggy?
I don't see any abnormalities in design, perhaps try relocating the gas points a bit and see if they decide that wondering aimlessly is less effective than just bringing it home.
I've tried five different geyser locations, and even tried lowering the cliff level of the island and making it wider. Still have the same problem. shit sux.
I made this map, and I just realized that on the gold island expansions, workers for some reason will do a complete circle around a refinery/assimilator/extractor before they enter in the usual place and gather from it. They often end up getting stuck in a corner too. Somebody suggested moving the geysers to the other side, so I flipped them, and I'm still having the same problem. All of the other expansions are fine.
All of the SCVs in those pictures are gathering gas.
0
Damn, I'm really stupid today. But I get it now. For reals this time. Thanks.
0
Ohhh, I was thinking that each time the trigger ran the variables would be reset back to zero. I didn't realize they kept their value.
I understand now. You've been extremely helpful, thanks.
BTW, I'm not actually going to run the trigger every second, that was just a rough estimate of how often I think it would be used. It's an 8-player tower defense map, so everybody would be putting units in bunkers at the same time after a wave.
0
I've decided to only have 4 units for the bunkers instead of 5, so that means 20 color combinations. I also realized that if you put a marauder in a bunker, you're not going to be able to have a marine/hydralisk combo, so I'll only need 6 switch actions each time a unit is loaded.
Would running a trigger with 6 switch actions every second make the map very laggy?
0
You could add additional move orders to the trigger. Make a point in the correct lane near the base and order the units to move to that point, then move to the destination using "after existing orders" instead of "replace existing orders."
0
The problem is I want to add tint rather than set it. Somebody puts a marauder in a bunker, that turns it red. After that, if they put a Marine in the same bunker, I want it to add blue tint to turn it purple. With your method it would just make the bunker red when a marauder enters, then turn it blue when a marine enters. I need to be able to get the current tint so I can add to that - so if a marauder is in a bunker, that sets the tint to 50% 0% 0%, and then if a marine enters, instead of setting it to 0% 0% 50%, it would get the current tint (50% 0% 0%) and add 50% to the red, making it purple.
I could do this, but as I said, there are 30 possible color combinations - wouldn't that make the map laggy? It's going to be a maze defense map where you build bunkers (which have a 1x1 footprint) and then build units inside of them, so the trigger would be running a lot.
0
I'm trying to make it so bunkers are tinted a certain color if a certain type of unit is loaded into them. For example: if marines are blue and marauders are red, then a bunker with one marine and one marauder would be purple, or a bunker with two marines would be blue, etc.
The problem is I need to add tint to a bunker when a marine is loaded into it, rather than set the tint of it. Here's what I have so far:
Events
Unit - Any Unit Loads Cargo
Conditions
(Unit Type of (Triggering Cargo Unit)) == Marine
Actions
Send Actor Message To Unit
Message: Set Tint Color
- Color: Convert Reals To Color With Alpha
- - Red: Arithmetic (Real)
- - - Value 1: Absolute Value (Real)
- - - - ?????
- - - Operator: +
- - - Value 2: 1.0
- - Green: 100.0%
etc.
This is where I'm having problems. I want to get the current percentage of red tint on the bunker and add to that. I've tried everything I could think of and nothing has worked.
Bunkers can only load two units in my map, so I suppose I could just make 30 triggers for all of the color combinations, but wouldn't that make my map laggy?
0
@Uplo: Go
...HOWEVER, if I change the unit data, the map is no longer classified as Melee. So I just put four regular geysers on each island.
0
Awesome, thanks Alex/Zetal, that fixed it.
0
I've tried five different geyser locations, and even tried lowering the cliff level of the island and making it wider. Still have the same problem. shit sux.
0
I made this map, and I just realized that on the gold island expansions, workers for some reason will do a complete circle around a refinery/assimilator/extractor before they enter in the usual place and gather from it. They often end up getting stuck in a corner too. Somebody suggested moving the geysers to the other side, so I flipped them, and I'm still having the same problem. All of the other expansions are fine.
All of the SCVs in those pictures are gathering gas.
0
Awesome, I was trying to figure this out a while back but I just got pissed off and gave up. Thanks.