Kills Counter
Events
Unit - Any Unit dies
Local Variables
Killer = (Killing player) <Integer>
Conditions
Actions
Variable - Modify Kills[Killer]: + 1
Needed global variable with [array]
Win condition:
Events
Timer - Every 1.0 seconds of Game Time
Local Variables
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Kills[(Picked player)] >= 100
Then
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Else
...
Using a periodic event to check the condition is very evil ;) Just check the condition directly:
IncreaseKillsForPlayerOptions:ActionReturnType:(None)ParametersPlayer=0<Integer>GrammarText:IncreaseKillsForPlayer(Player)HintText:(None)CustomScriptCodeLocalVariablesindex=0<Integer>ActionsVariable-Setindex=(Player-1)Variable-ModifyKills[index]: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Kills[index] >= Kill Limit
Then
Game - End game in Victory for player Player (Show dialogs, Show score screen)
Else
// Here you would also update your dialogs etc.
I am not quiet sure if I understand what you mean and if it makes sense, but the method I use should work in most cases. It actually works like AioncannonzSC2 explained and the graphics I used are very similar to his.
It doesn't matter if the bar is divided into 3, 4 or 10 parts. If you want to fill whole parts at once, you'll have to increase the size of the steps.
It is just a little more math, but nothing really complicated.
While a list of function or grammar checking is good, there's no point making test output without actually using sc2 engine, there's no point doing that.
I just found a way make it work with cost between 2 points.
(Pathing cost between (Center of PLAYER01SPAWN) and (Center of PLAYER00END)) == 65536
Does the trick and its working quite well. I found 65536 by displaying the pathing cost when blocking the path and it always return 65536 when there is no path.
Yeah, but it doesn't always work. I can give you an example where the path is blocked, an the pathing cost is around 240 (mostly when builing diagonally). It seems to be a bug in the path finding engine itself.
you can use built-in pathing cost of units to figure out if the unit is blocked or not. If the pathing cost of a unit returns -1 then this means there is no path to where the unit wants to go hence it's blocked. There are a couple of built in comparisons functions in the editor, cost between 2 points, or cost between a unit and a point, something like that, i used it for my TD map.
I once tried to do this by using "pathing exists between pointA and poinB" or "pathing cost between points", but these doesn't seem to work in that case.
You could create a temporary unit at that point, check if it is visible and then remove it from the game.
LocalVariablesisvisible=false<Boolean>ConditionsActionsUnit-Create1Appleforplayer12atPoint001usingdefaultfacing(NoOptions)Variable-Setisvisible=((Lastcreatedunit)isvisibletoplayer1)Unit-Remove(Lastcreatedunit)fromthegameGeneral-If(Conditions)thendo(Actions)elsedo(Actions)Ifisvisible==trueThen------- The point is visibleElse------- The point is not visible
You could try do reduce your code size by using the Galaxy language. If you have many loops, there might be a chance to reduce the generated code as well. But its hard to tell without seeing the code. There could be some design flaws causing lots of redundant code/variables which take a lot of space.
It would be great if they would accelerate towards you and not just move towards you in a linear motion. I think that can easily be changed in the data editor.
Pick player is more efficient, because it uses built-in functionality. Unfortunately it does not work when you want to nest player loops. In this case you would have to use at least one for-loop.
0
Using a periodic event to check the condition is very evil ;) Just check the condition directly:
0
I am not quiet sure if I understand what you mean and if it makes sense, but the method I use should work in most cases. It actually works like AioncannonzSC2 explained and the graphics I used are very similar to his. It doesn't matter if the bar is divided into 3, 4 or 10 parts. If you want to fill whole parts at once, you'll have to increase the size of the steps. It is just a little more math, but nothing really complicated.
I don't know why one should use three circles.
0
It's not a tutorial, but I threw together a small example map.
0
And here is how to do it: http://forums.sc2mapster.com/development/map-development/11583-hiding-game-ui-then-showing-timer-windows/#p3
0
Note: you should use modify variable instead of
because it is less error-prone.
I also recommend to use only one trigger and an if-statement instead of a trigger condition.
0
A UI-Preview would be nice though.
0
What you are searching for is "for each integer ...".
0
Yeah, but it doesn't always work. I can give you an example where the path is blocked, an the pathing cost is around 240 (mostly when builing diagonally). It seems to be a bug in the path finding engine itself.
The interesting thing is, that
is true in both cases.
0
I once tried to do this by using "pathing exists between pointA and poinB" or "pathing cost between points", but these doesn't seem to work in that case.
0
Note: That event doesn't fire, if you set the building time to 0.0.
0
You could create a temporary unit at that point, check if it is visible and then remove it from the game.
0
You could try do reduce your code size by using the Galaxy language. If you have many loops, there might be a chance to reduce the generated code as well. But its hard to tell without seeing the code. There could be some design flaws causing lots of redundant code/variables which take a lot of space.
0
and leave all the counting.
0
It would be great if they would accelerate towards you and not just move towards you in a linear motion. I think that can easily be changed in the data editor.
0
Pick player is more efficient, because it uses built-in functionality. Unfortunately it does not work when you want to nest player loops. In this case you would have to use at least one for-loop.