Apologies if this has been answered, but I have tried searching all around and can not find a solution.
I am trying to use triggers to change the UI: CActorUnit_BarHeight values for all of the units that are ever on the map. I tried just doing a test run to see if a catalog set would work, but it failed to make any changes:
Catalog - Set value of Actors Probe BarHeight for player 1 to "4"
The actual Action that I am using (since it includes all units created - proven to work in a different trigger where I increase unit scale):
Catalog - Set value of Actors (Unit type of (Created Unit)) BarHeight for player 1 to "4"
I was just not sure the middle part works, so I tested a more generic version with Probe, as mentioned above.
I know that the event is running because other Actions are running from it (tested on map initialization, too). I have tried including all player numbers, as well.
I know I can just change these values in Data, but that was actually what I did in the WoL version of my mod. I am adapting my map to HotS, and I figured I would make it more streamlined by placing it in Triggers, where most of my other changes are. It is a pain to go through all of the units in the Data editor to change this, and even then that may not be completely thorough.
Is it just not possible to modify UI BarHeight in the Triggers? Any ideas? Thanks!
Sorry if this does not belong here. I have made a melee mod for SC2, and everything works, except I just tried to change the costs of the assimilator, refinery, and extractor in my mod, but it does not show up in the data editor when I set the mod as a dependency in my maps. I have tried even downloading a random map, but it still does not show up.
When I play a game, the geyser unit ends up not having a cost.
Something that I found odd is that if I reset them to their parent/default values (LibertyMulti), the cost for the extractor is wrong, as it says it is 75. I have tried restarting the editor as well as checking values in official maps and such. All the same.
Can anyone please explain to me why it fails to say the correct cost as well as how I can effectively change it in my mod to be reflected in the maps? How is it getting the correct value for the extractor (25) if LibertyMulti is wrong?
Thanks.
EDIT: Weird, if I change the value in my map to the one I have in my mod, the text turns into the gold colour that signifies it is coming from my mod. I checked a few other values and it just seems it needs a refresh. I wonder if anyone else gets this problem. Is there a way to completely refresh the values? (reloading the editor does not seem to help)
It still is not reflecting in the game, though. No cost for the extractor... :( The changes work for the other 2, however. so odd
How would I make it so the following criteria are fulfilled?
1. Opposing players can not push each others' units at all.
2. Personal units of the same push priority can not push each other.
3. Personal units of greater push priority can push units of lower push priority, and lower push priority units can not push units with greater push priority.
For a different scenario, is it possible to have units of the same priority not push each other but units of different (either greater or less) priority push each other? For example, zergling == 5 and roach == 6. Zerglings can not push other zerglings, and roaches can not push other roaches. However, roaches can push zerglings, and zerglings can push roaches.
Note: In any of these cases, units that are on hold position or are attacking should not be able to be pushed. Only if they are just standing there ("stopped") that they should be able to be pushed.
Got it. I ended up just making a trigger to count how long it stays as a gateway and modify the warpgatetrain ability accordingly. I used the number of abilities == 3 to check when it changes back to a warpgate (gateway has 5).
Oh, that's pretty neat. :) I did not know about the generics.
I do need that check for gateway transform to be checked within the warpgate to gateway trigger, though, so I can not use an event trigger for this part.
I managed to do it by checking when the number of abilities changes. The number of abilities for warpgates is 3, but gateways have 5. (Oddly enough, I thought warpgates had 4, if you count them in the data editor).
Oh, that is nice to know. I thought I already tried the wait at every 0.1 seconds, but I will try again. I thought "executing" would mean the whole time that the warpgate is transforming, rather than a "start executing", so I was not worried about that number. Is there a source for that it only lasts half a second or so, or just from experimentation?
Hm, I am not sure what you mean by having the event trigger on generic3 - execute for this case. I have the trigger event on when the warpgate transforms into a gateway, so Triggering unit does refer to that unit (I thought otherwise, because my trigger was not working, but I believe you) I need it to start here because I need to calculate the time it spends as a gateway before it turns back into a warpgate. All of this needs to be done within the same trigger, so I may use the local variables that hold the duration. What do you mean?
Theoretically, it should work with the wait at 0.0 seconds, so I will try that and get back. Maybe I goofed earlier. I did try a while loop, and I thought that would be equivalent to a wait with 0.0 seconds...
I actually would prefer not to use a wait and use an event trigger (to check when the gateway turns back into a warpgate), instead, but I am not sure how to do that in this case and still have the time variable (that was calculated going from warpgate to gateway) available for use there. If you could explain to me, I would greatly appreciate it. Thanks!
EDIT: Tried the 0.0, still getting stuck in the wait. :(
I am eventing at a warpgate transforming into a gateway, but how would I refer to the gateway that the warpgate turned into (in the same trigger)? I tried
General - Wait for (Conditions), checking every 1.0 Game Time seconds
Conditions
((Triggering unit) ability command Gateway - Transform to Warp Gate is in state Executing) == True
but it seems to get stuck there despite me transforming it back into a warpgate, so I am thinking that Triggering unit only refers back to the original warpgate? Basically, I just want this part to wait for that gateway to transform back into a warpgate.
The trigger just counts the amount of time in gateway mode, so it can reduce the cooldown of the warpgate accordingly, excluding transformation times. I think I have other ways of implementing this, but this just bothers me >_<
How would I refer to the unit that is the product of a transformation?
I put the WarpGateTrain ability on the Gateway, and it works as you think it would. However, if I push W, it still selects all of the Gateways. Is there any way to change that? I want W to only select Warpgates (instead of all units that have the WarpGateTrain ability) and the cooldown to still decrease while in Gateway form. I think the W is hardcoded into the WarpGateTrain ability but is there any other way to do this?
Is it possible to link the cooldown to something in addition to WarpGateTrain? That way I can put this something else on the Gateway, and it will not affect the normal Warpgate operation. It can be a dummy ability or something.
Thanks.
EDIT: Hm, is there a way to grab the current cooldown of an ability via triggers? I think I have a solution for what I want to do. I will post my findings here, but the answer to that question will help me a lot.
I have looked thoroughly at WarpGateTrain and other items in the data editor, but I have not found anything that I could change that allows the Warpgate cooldown to continue once it is back in its Gateway form.
In particular, I am wanting to have the remaining cooldown on the Warpgate decrease 2-3x slower when in Gateway form, if at all possible. So far, the Warpgate cooldown just freezes when it is out of that form.
I would like the Warpgate's cooldown to freeze during transformation, decrease several times slower in Gateway form, and decrease normally in Warpgate form. If that is not possible, just having it continue cooldown at normal pace while in Gateway form is fine.
Is there anyone who has an idea about this? Thanks in advance!
0
Apologies if this has been answered, but I have tried searching all around and can not find a solution.
I am trying to use triggers to change the UI: CActorUnit_BarHeight values for all of the units that are ever on the map. I tried just doing a test run to see if a catalog set would work, but it failed to make any changes:
Catalog - Set value of Actors Probe BarHeight for player 1 to "4"
The actual Action that I am using (since it includes all units created - proven to work in a different trigger where I increase unit scale):
Catalog - Set value of Actors (Unit type of (Created Unit)) BarHeight for player 1 to "4"
I was just not sure the middle part works, so I tested a more generic version with Probe, as mentioned above.
I know that the event is running because other Actions are running from it (tested on map initialization, too). I have tried including all player numbers, as well.
I know I can just change these values in Data, but that was actually what I did in the WoL version of my mod. I am adapting my map to HotS, and I figured I would make it more streamlined by placing it in Triggers, where most of my other changes are. It is a pain to go through all of the units in the Data editor to change this, and even then that may not be completely thorough.
Is it just not possible to modify UI BarHeight in the Triggers? Any ideas? Thanks!
0
@ckSynergy: Go
Wow, thank you for the thorough reply. This definitely helps!
0
@purakushi: Go
Ah, nevermind. I did not realise Zerg structure costs work a bit differently: http://us.battle.net/sc2/en/forum/topic/7811151669?page=1#3
I should have checked other Zerg buildings... oops. Got it working. Thanks!
0
Sorry if this does not belong here. I have made a melee mod for SC2, and everything works, except I just tried to change the costs of the assimilator, refinery, and extractor in my mod, but it does not show up in the data editor when I set the mod as a dependency in my maps. I have tried even downloading a random map, but it still does not show up. When I play a game, the geyser unit ends up not having a cost.
Something that I found odd is that if I reset them to their parent/default values (LibertyMulti), the cost for the extractor is wrong, as it says it is 75. I have tried restarting the editor as well as checking values in official maps and such. All the same.
Can anyone please explain to me why it fails to say the correct cost as well as how I can effectively change it in my mod to be reflected in the maps? How is it getting the correct value for the extractor (25) if LibertyMulti is wrong?
Thanks.
EDIT: Weird, if I change the value in my map to the one I have in my mod, the text turns into the gold colour that signifies it is coming from my mod. I checked a few other values and it just seems it needs a refresh. I wonder if anyone else gets this problem. Is there a way to completely refresh the values? (reloading the editor does not seem to help)
It still is not reflecting in the game, though. No cost for the extractor... :( The changes work for the other 2, however. so odd
0
How would I make it so the following criteria are fulfilled?
1. Opposing players can not push each others' units at all.
2. Personal units of the same push priority can not push each other.
3. Personal units of greater push priority can push units of lower push priority, and lower push priority units can not push units with greater push priority.
For a different scenario, is it possible to have units of the same priority not push each other but units of different (either greater or less) priority push each other? For example, zergling == 5 and roach == 6. Zerglings can not push other zerglings, and roaches can not push other roaches. However, roaches can push zerglings, and zerglings can push roaches.
Note: In any of these cases, units that are on hold position or are attacking should not be able to be pushed. Only if they are just standing there ("stopped") that they should be able to be pushed.
Thanks!
0
Got it. I ended up just making a trigger to count how long it stays as a gateway and modify the warpgatetrain ability accordingly. I used the number of abilities == 3 to check when it changes back to a warpgate (gateway has 5).
0
@willuwontu: Go
Oh, that's pretty neat. :) I did not know about the generics.
I do need that check for gateway transform to be checked within the warpgate to gateway trigger, though, so I can not use an event trigger for this part.
I managed to do it by checking when the number of abilities changes. The number of abilities for warpgates is 3, but gateways have 5. (Oddly enough, I thought warpgates had 4, if you count them in the data editor).
Thanks!
0
@willuwontu: Go
Oh, that is nice to know. I thought I already tried the wait at every 0.1 seconds, but I will try again. I thought "executing" would mean the whole time that the warpgate is transforming, rather than a "start executing", so I was not worried about that number. Is there a source for that it only lasts half a second or so, or just from experimentation?
Hm, I am not sure what you mean by having the event trigger on generic3 - execute for this case. I have the trigger event on when the warpgate transforms into a gateway, so Triggering unit does refer to that unit (I thought otherwise, because my trigger was not working, but I believe you) I need it to start here because I need to calculate the time it spends as a gateway before it turns back into a warpgate. All of this needs to be done within the same trigger, so I may use the local variables that hold the duration. What do you mean?
Theoretically, it should work with the wait at 0.0 seconds, so I will try that and get back. Maybe I goofed earlier. I did try a while loop, and I thought that would be equivalent to a wait with 0.0 seconds...
I actually would prefer not to use a wait and use an event trigger (to check when the gateway turns back into a warpgate), instead, but I am not sure how to do that in this case and still have the time variable (that was calculated going from warpgate to gateway) available for use there. If you could explain to me, I would greatly appreciate it. Thanks!
EDIT: Tried the 0.0, still getting stuck in the wait. :(
0
I am eventing at a warpgate transforming into a gateway, but how would I refer to the gateway that the warpgate turned into (in the same trigger)? I tried
General - Wait for (Conditions), checking every 1.0 Game Time seconds Conditions ((Triggering unit) ability command Gateway - Transform to Warp Gate is in state Executing) == True
but it seems to get stuck there despite me transforming it back into a warpgate, so I am thinking that Triggering unit only refers back to the original warpgate? Basically, I just want this part to wait for that gateway to transform back into a warpgate.
The trigger just counts the amount of time in gateway mode, so it can reduce the cooldown of the warpgate accordingly, excluding transformation times. I think I have other ways of implementing this, but this just bothers me >_<
How would I refer to the unit that is the product of a transformation?
Thanks!
0
@zorbotron: Go
I put the WarpGateTrain ability on the Gateway, and it works as you think it would. However, if I push W, it still selects all of the Gateways. Is there any way to change that? I want W to only select Warpgates (instead of all units that have the WarpGateTrain ability) and the cooldown to still decrease while in Gateway form. I think the W is hardcoded into the WarpGateTrain ability but is there any other way to do this?
Is it possible to link the cooldown to something in addition to WarpGateTrain? That way I can put this something else on the Gateway, and it will not affect the normal Warpgate operation. It can be a dummy ability or something.
Thanks.
EDIT: Hm, is there a way to grab the current cooldown of an ability via triggers? I think I have a solution for what I want to do. I will post my findings here, but the answer to that question will help me a lot.
0
I have looked thoroughly at WarpGateTrain and other items in the data editor, but I have not found anything that I could change that allows the Warpgate cooldown to continue once it is back in its Gateway form. In particular, I am wanting to have the remaining cooldown on the Warpgate decrease 2-3x slower when in Gateway form, if at all possible. So far, the Warpgate cooldown just freezes when it is out of that form.
I would like the Warpgate's cooldown to freeze during transformation, decrease several times slower in Gateway form, and decrease normally in Warpgate form. If that is not possible, just having it continue cooldown at normal pace while in Gateway form is fine.
Is there anyone who has an idea about this? Thanks in advance!