I could use a skillful triggerer to help me with this. I am making a melee training map that based on what buildings you build and at WHAT TIME of the game you build them you get reward or penalty. I am following a specific designated build order to train, on which player will be rewarded or not, but I just realized the actions may duplicate.
I guess it depends on how you want to do it. What do you want to happen if the player for example builds two factories at Mission time 200? Do you want both to count towards the 270 win definition or only the first one and the second one goes to the loss @ 540 definiton? In the first case you could connect both conditions with or:
In the second case you could check how many have already been built (by either a variable counting up whenever it is built, or by checking how many there are on the map in case it's guaranteed they dont get destroyed).
You could then check like
I have been using some Number of e.g (Living) (Factory) units in Entire map owned by player .. at most (any) amount.
When a structure is under construction does it count as Living and on the map? I do have a trigger to get a LOSS for Canceling a building (to avoid abuse of early start). So basically I want to make the win/loss for a certain building built at a certain time without this affecting the later construction of the same unit type.
If they build the first Factory @200 they get the win, if they decide a 2nd factory also at @200 then they should get nothing for the 2nd - neither win, nor loss. The point is if they misuse the build and WASTE resources for other buildings they will not have enough to build the rest buildings on time, thus will get punished.
Okay that sounds a bit different.Do you have triggers anywhere that punish players if they didnt build the stuff at all? (Since the construction thing will not run if nothing is constructed)
How are the win and loss stuff used? Do you want to give more points the earlier some goal was achieved or any other sort of progress for each goal? Or do you just want to give points depending on goal is achieved or not? In the second case you could switch your system to some time based one (Like trigger for first factory: Event - Time elapsed is 270 Actions - Win if there are any factories built and for second one two triggers, one which saves how many factories you have at 540 and one that checks at 565 if there are more factories than before).
No, the buildings are meant to be built, not building them on time is enough of punishment, no need for 'not having them at all'.
Basically I decided to have a Variable for points, Var is the points for doing things on time Var is for doing them late, if Var > Var then WIN else LOSS but that's the easy part, the question is the system itself.
You mean, I should not have used Mission time, instead Time Elapsed becomes... X? This needs to be detected when the structure is being built, what is the Condition to use if not Mission Time, Time Lapsed?
What is the difference b-n this and using the construction event? Is Time Lapsed the only tway to detect how much time has passed since the start?
Also, does a structure under construction count as Living unit? The problem is that a building may finish in the UNKNOWN time, so I do not need to detect when a building is DONE, I need when it is started, so from this perspective I prefer using
To answer your question, set a boolean variable to TRUE when the first factory is being built. This way, even if the factory is somehow destroyed later, the switch will still be TRUE. You can include My_Switch == FALSE in your conditions for the first factory and My_Switch == TRUE in your conditions for the second factory. Now you can run your trigger every time a factory is being built and it will check the state of My_Switch before evaluating what actions to take.
I completely remade the system. I started using multiple Elapsed Time triggers with waits, when I wanted at certain points some things to happen. Also I check whether a certain building is under construction or the number of units of that type including the one under construction to see if it is X number of that type.
The issues I'm having now are much different, they are exactly to detecting whether something is on the map, is upgraded is trained..
Detecting A Building Under Construction Including Counting It With Already Built Of Same Type
I want to check if at 13 supply a Refinery is under construction/started, seems it doesn't work:
Random any unit under construction didn't execute the triggers,
(Number of Living units in (Refinery units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 1 -Did not work either
So how do I detect a building under construction, Number of units only for units already built and alive?
Detecting An Upgrade In Progress
(Stimpack count for player 1, counting In Progress) == 1
detecting whether an upgrade is being done? Yes only one exists at a time anyway
Detecting Unit Type In Training
(Number of Living units in (Reaper units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 1
Not entirely sure if this is stuff you've tried or still need help on...
But there's a value called "unit progress (percent)" that you can use in conditions. Also if this is simply for training, so you're not fighting anyone, you could use "Unit property" and grab their life/life (percent) as this would give you an indication as to how far along a building is. There's also some "training queue" things that I've never tried myself...
With "unit filter match" you can specify whether something is under construction or not, as well as many other things. Looks like there's also one specifically just for "unit is under construction"
So yea, I was just looking at some of the different condition inputs to see what might be relevant. Dunno if it helped. Also, when I click your link in the first post it just brings me back to this post...
Unit progress % does not specify the unit type being trained that has to be detected, it gives only option Slot - the slot could be any but the condition is not to detect the type. And (Unit) is just to detect the unit that is doing the training. Unit Life works on a unit being trained? It may work for construction but I don't think it works on Unit being trained.
I even used a separate Trigger with a Unit training is Started event and set variable (unit type) == Reaper and if at Player Mineral Changes event trigger I check if Supply Used === e.g 16 and if Variable = That Unit Type (Reaper). it doesn't execute the actions like wtf