The default when you add condition after condition is "and" (i think it even say so if you click "and" / "or" and read the tooltip. So, we have to add an "or" group. Anything under this will work separately to pass the condition. i == 0,3 and 4 is pretty straight forward. For the last one, I'd like to use the "Within bounds" condition, but that's locked to "<=" on both ends, so we have to add an "and" condition in the "or" group and add the last two conditions here. Dunno why I felt the need to explain this in text form, probably made things more unclear, if anything. Just watch the code, it's pretty self explanatory.
Might be wrong here, but I believe someone said that that event is bugged. (add a debug message to see if the event ever fires)
Maybe you could do a periodic check that picks all players in the player group Active instead and removes units for any player not in that group.
Edit:
Another thought. The other available options, are Win, Defeat and Tie. Also, the tooltip of the event: "...with the specified victory type."
It's likely that this event is not supposed to catch players leaving the game without a victory type. I'd assume a player defaults to Loss when they leave, but maybe not.
Perhaps if you add "UI - Player Any Player selected Quit Button on the Game Menu Dialog" as an additional event (or maybe you only need this one) to catch pleyers leaving your game. Like this:
There are still a few things to deal with here, but the here are the basics how I would do it.
Move your HT, type "spawn" and "kill" in the chat to run the triggers.
Thoughts...
I'm ordering the units to a position relative to where it was when the new order was issued. This means that is they somehow get off course, they will not be able to correct themselves. If this turns out to be an issue you could de-spawn the units each time a move order is issued and recreate them on the correct position (run the kill and spawn triggers followed by the move orders each time). Since your units apparently are invisible, the kill/spawn won't be seen, so this might be what you want to do anyway to avoid random issues later on.
A unit will be spawned on top of the main unit. I chose observers to avoid collisions in my test enviroment. If needed, you could add a condition to the spawn that checks for the "middle spawn" and skip that unit.
There are some orders that will cause the follow move orders to misfire. An example is follow orders, the sub units will move to the initial position, but not follow further. Another is if the main unit auto aquires a target and runs off to attack, the move trigger will not fire.
Running a trigger each 0.5 seconds or so that de-spawns and respawn the units instead of the move order trigger could be a better choice, especially if the units are not seen since it would look quite odd otherwise.
I don't think you can "fill" a region with units. You can try using Create Unit in Random Point in Region multiple times. I don't know if it will show an error or something is the point is already occupied (there are workarounds for this anyway).
It won't give an error, the unit will simply be created as close to the position as possible.
As for the spawning locations, instead of randomly filling the region until x number of units, you could use this method (if the region is rectangular). Make that into a function with the region, unit type to be created and possibly the offset between units as parameters
Making the entire unit group move as one could also be possible. Once you have the units spawned, issue orders to them, mimicking the main units order with an offset relative to their position in the region. This, however, would break badly as soon as they collide with anything. Depending on your map, I'd try the spawn and remove way first.
... or if the regions only contain hatcheries or other buildings you'd like to loop through, add the buildings to a unit group and use that instead in your for loop.
There's pretty much always another way of doing the same thing (usually without too much "ugly code") when the editor doesn't let you do it the first way.
I don't know how you got that to work miheinen. A burrowed zergling cannot be ordered to move or attack since those orders are disabled. I made this work by adding a brief wait before the attack/move order.
If I'm not mistaken, you can't save games in multiplayer. So you'd either have to play the map in singleplayer mode or store and recall data manually to create your own saves. Where the hero is, who is alive / dead, etc.
I asked for something like this a while back, but noone could come up with a real answer. I ended up using a range indicator actor and lowered the distance between images to fill in the gaps. Looks quite nice, but I'll be sure to test this out if I need something that isn't a circle sometime.
Yup, that's what I was thinking, except you don't really need a new player just to store a mineral amount. You probably already finished the triggers for this, but it's fun to play around with, so I made one myself.
I'm using the mineral cost of a unit to avoid having to define variables for each wave / unit. It's not the best for easy overview compared to having a trigger defining each wave... I guess it's not really easier my way either since you still have to modify each cost in the data editor. Well it was really easy to use in my example since I haven't defined anything anywhere. ;-)
Nope, I use the un/commandable functionality as an integral part of my map. Disabling it and enabling it multiple times. I'm guessing your trigger is bugged elsewhere. If you paste the trigger that is supposed to make the units commandable again and any other relevant info, maybe I can find the bug.
My wild guess would be that you either make the wrong unit commandable, or that the trigger simply isn't running.
Try to use the Active Players, player group. Each time anyone score a kill, add x minerals to a variable and share that among all currently active players. If it's an un-even amount, keep part of it in the pot until the next kill.
Example:
3 players are active (playing)
A mob is killed that gives the team 14 minerals
Each player receives 4 minerals, 2 are left in the pot.
Another mob is killed (14 minerals)
Each player receives 5 minerals, 1 remains in the pot.
0
The default when you add condition after condition is "and" (i think it even say so if you click "and" / "or" and read the tooltip. So, we have to add an "or" group. Anything under this will work separately to pass the condition. i == 0,3 and 4 is pretty straight forward. For the last one, I'd like to use the "Within bounds" condition, but that's locked to "<=" on both ends, so we have to add an "and" condition in the "or" group and add the last two conditions here. Dunno why I felt the need to explain this in text form, probably made things more unclear, if anything. Just watch the code, it's pretty self explanatory.
0
Might be wrong here, but I believe someone said that that event is bugged. (add a debug message to see if the event ever fires)
Maybe you could do a periodic check that picks all players in the player group Active instead and removes units for any player not in that group.
Edit:
Another thought. The other available options, are Win, Defeat and Tie. Also, the tooltip of the event: "...with the specified victory type."
It's likely that this event is not supposed to catch players leaving the game without a victory type. I'd assume a player defaults to Loss when they leave, but maybe not.
Perhaps if you add "UI - Player Any Player selected Quit Button on the Game Menu Dialog" as an additional event (or maybe you only need this one) to catch pleyers leaving your game. Like this:
0
@johney7289: Go
Posted my take on this in the original topic since it doesn't really fit here.
0
There are still a few things to deal with here, but the here are the basics how I would do it.
Move your HT, type "spawn" and "kill" in the chat to run the triggers.
Thoughts...
I'm ordering the units to a position relative to where it was when the new order was issued. This means that is they somehow get off course, they will not be able to correct themselves. If this turns out to be an issue you could de-spawn the units each time a move order is issued and recreate them on the correct position (run the kill and spawn triggers followed by the move orders each time). Since your units apparently are invisible, the kill/spawn won't be seen, so this might be what you want to do anyway to avoid random issues later on.
A unit will be spawned on top of the main unit. I chose observers to avoid collisions in my test enviroment. If needed, you could add a condition to the spawn that checks for the "middle spawn" and skip that unit.
There are some orders that will cause the follow move orders to misfire. An example is follow orders, the sub units will move to the initial position, but not follow further. Another is if the main unit auto aquires a target and runs off to attack, the move trigger will not fire.
Running a trigger each 0.5 seconds or so that de-spawns and respawn the units instead of the move order trigger could be a better choice, especially if the units are not seen since it would look quite odd otherwise.
Hope it helps!
0
It won't give an error, the unit will simply be created as close to the position as possible.
As for the spawning locations, instead of randomly filling the region until x number of units, you could use this method (if the region is rectangular). Make that into a function with the region, unit type to be created and possibly the offset between units as parameters
Making the entire unit group move as one could also be possible. Once you have the units spawned, issue orders to them, mimicking the main units order with an offset relative to their position in the region. This, however, would break badly as soon as they collide with anything. Depending on your map, I'd try the spawn and remove way first.
0
... or if the regions only contain hatcheries or other buildings you'd like to loop through, add the buildings to a unit group and use that instead in your for loop.
There's pretty much always another way of doing the same thing (usually without too much "ugly code") when the editor doesn't let you do it the first way.
0
What he said.
Generally, whenever you create something you want to keep track of. Save it to a variable ASAP. Don't use "last created ..." more than you have to.
0
I don't know how you got that to work miheinen. A burrowed zergling cannot be ordered to move or attack since those orders are disabled. I made this work by adding a brief wait before the attack/move order.
0
If I'm not mistaken, you can't save games in multiplayer. So you'd either have to play the map in singleplayer mode or store and recall data manually to create your own saves. Where the hero is, who is alive / dead, etc.
0
Cool stuff.
I asked for something like this a while back, but noone could come up with a real answer. I ended up using a range indicator actor and lowered the distance between images to fill in the gaps. Looks quite nice, but I'll be sure to test this out if I need something that isn't a circle sometime.
0
Yup, that's what I was thinking, except you don't really need a new player just to store a mineral amount. You probably already finished the triggers for this, but it's fun to play around with, so I made one myself.
I'm using the mineral cost of a unit to avoid having to define variables for each wave / unit. It's not the best for easy overview compared to having a trigger defining each wave... I guess it's not really easier my way either since you still have to modify each cost in the data editor. Well it was really easy to use in my example since I haven't defined anything anywhere. ;-)
0
@EjnarH: Go
Dooh, it clearly says experience level. Dunno what I was thinking. I probably wasn't. :-p
0
I haven't tested it myself, but unless this is bugged it should be what you are looking for:
0
Nope, I use the un/commandable functionality as an integral part of my map. Disabling it and enabling it multiple times. I'm guessing your trigger is bugged elsewhere. If you paste the trigger that is supposed to make the units commandable again and any other relevant info, maybe I can find the bug.
My wild guess would be that you either make the wrong unit commandable, or that the trigger simply isn't running.
0
Try to use the Active Players, player group. Each time anyone score a kill, add x minerals to a variable and share that among all currently active players. If it's an un-even amount, keep part of it in the pot until the next kill.
Example:
3 players are active (playing)
A mob is killed that gives the team 14 minerals
Each player receives 4 minerals, 2 are left in the pot.
Another mob is killed (14 minerals)
Each player receives 5 minerals, 1 remains in the pot.