| 06-25-2010, 12:14 AM | #2 |
You condition is messed up. 1) it should be "Owner of Triggering Unit" 2) You can use "Triggering Player" (returns the owner of the triggering unit if you're using an "any unit" event 3) RoundNumber conditions list is way too long. Just do whenever RoundNumber reaches 5, run the action, then set it to 0 so that it can run indefinitely without putting redundant work on you the programmer. 4) Get rid of the "Do Nothing", you only need that in if/then/else single. You can safely leave that field blank. |
| 06-25-2010, 12:56 AM | #3 |
Instead of grouping and counting units every time, you could increment an integer variable whenever you spawn a unit and decrement it whenever a unit dies. Once the variable reaches 0, spawn the next round. |
| 06-25-2010, 04:02 PM | #4 |
I am practically a beginner at this stuff, aside from my own self-crash-course while making this map as it is so far, so please forgive my general ignorance. @Bribe: 1+2.I'm not sure what you mean--the action checks whether it's player 12, and the condition is counting the units matching condition.. I don't know how this will help, because I don't know the deep programming of it or anything. How it's set up seems to work perfectly in-game except in the case I'm discussing, and I don't know (again, due to my own ignorance) how this suggestion will help it... 3.Well, the problem is most special rounds have different effects from one another (that isn't the whole trigger up there, I have an if/then/else function for each special round number but it's not really relevant to the problem I'm having), and not all of them are multiples of 5 (e.g. 12, 17, 49), and the numbers are used in several strings, such as the countdown timer. Plus, the round start triggers check for roundnumber as an extra failsafe in case a trigger gets turned on accidentally when it isn't supposed to be. (In fact, this failsafe is what makes the map stop sending rounds at all instead of sending two rounds at once or something when the error described above occurs.) I was originally going to make a separate trigger for the different round numbers, turning on and off the regular round end and those triggers when rounds were started, but that seemed like even more trouble. I see what you mean though, I can make a boolean "Specialround" and just have it check whether it's true or not instead of a multitude of numbers. 4.Thanks, there are a lot of 'do-nothings' in my triggers because I tend toward the more overcareful side of doing things... @anitarf: It seems like that would require adding another extra trigger, and I don't know (ignorance probably) how that will improve things, or in particular fix the reincarnation problem.. |
| 06-28-2010, 01:09 AM | #5 |
What Anitarf mentioned is mostly for efficiency's sake. What he's saying is to keep track of how many creeps you've spawned with a variable and subtract from it when something's killed, which you could do in the same trigger, then follow up with the conditions (if/then). The way you're currently doing it is somewhat inefficient, since you're now counting all remaining units of the player brown every time one of his units dies. As for the reincarnation issue, I'm not sure. I've never really dealt with reincarnation in a situation where I needed to check if the unit was one hundred percent dead. Edit: I did some testing, and I've got a theory as to where your trigger could go wrong. First off, the "Unit dies" event doesn't seem to fire when a unit dies while reincarnation is ready. Secondly, you count units that are alive every time a unit dies. Now, let's have an example. Say you have two creeps, and you kill one. Reincarnation starts, and while it's down, you kill the other. (Which, for arguments sake, doesn't have reincarnation ready.) Now, when the other creep died, you count units still alive, and as such the one still reincarnating isn't accounted for. It's just a theory, though. I could be wrong. But I don't see how it would break your map entirely, however. Based on what I see in your trigger, it shouldn't do more than skip a round or three. (As the trigger would run every time you kill the "last" creep. Maybe it stops spawning because you haven't made the rounds that come a few rounds afterward yet?) Anitarf's suggestion should cover this. |
| 06-28-2010, 02:37 AM | #6 |
It actually would skip a round but for some checks I placed in the round triggers themselves that check for round variable. (i.e., round x checks if integer variable "roundnumber" is equal to x). In any case I wouldn't want it skipping a round either. I see what you mean--I'll try that for a fix and see what happens. Thank you very much for your help, and for tolerating my general ignorance. EDIT: I guess I'll have to add in some re-counts for animate dead and resurrection spell casts, but that should be easy enough because those spells are already in triggers to "force" the enemy to cast them. And..ah dang, there's summon spells too... |
| 06-28-2010, 05:07 AM | #7 | |
Quote:
|
| 06-28-2010, 01:30 PM | #8 |
Okay, I'm having the triggers that activate summoning, AD and Ressurection spells also make a recount after the spells are cast..there's just one little problem--I have a Tinker boss who uses Pocket Factory. I guess a periodic check and recount might fix that, but then I'll be counting the units over and over again, and it might not even be that reliable. |
| 06-29-2010, 10:10 AM | #9 |
You could have a "Unit enters region (Entire map)" event to count units. Methinks that should cover just about everything. |
| 06-29-2010, 07:03 PM | #10 |
Oh wow that would make things so much simpler.. So if I understand correctly, this trigger should count all the units made, even if there's 10 units created at the same time by another trigger it will fire for each one? |
| 06-30-2010, 02:19 AM | #11 |
Yup, it'll fire for each unit created. |
