Skip to content
Home
Post Code
Jass (Warcraft III)
Wurst
GUI (Warcraft III)
Galaxy (StarCraft II)
GUI (StarCraft II)
C++
Java
Delphi
Text
Search Code
Compare Code
Uploads
Draw
Create New Drawing
View Drawings
Graph
Log in
[code]Supply Warning Events Player - Player [color=FFFF77]0[/color] Supplies Used changes Player - Player [color=FFFF77]1[/color] Supplies Used changes Player - Player [color=FFFF77]2[/color] Supplies Used changes ------- etc... Local Variables p = [b]([/b]Triggering player[b])[/b] <Integer> free supply = [b]([/b][b]([/b]Player p Supplies Made[b])[/b] - [b]([/b]Player p Supplies Used[b])[/b][b])[/b] <Integer> Conditions Supply Cap Warning Is Active[b][[/b]p[b]][/b] == False Actions Variable - [color=990066]Set[/color] Supply Cap Warning Is Active[b][[/b]p[b]][/b] = True General - While [b]([/b]Conditions[b])[/b] are [color=7777FF][b]true[/b][/color], [color=7777FF][b]do[/b][/color] [b]([/b]Actions[b])[/b] Conditions free supply < [color=FFFF77]4[/color] Actions [color=990066]Dialog[/color] - Show Supply Cap Warning [color=990066]Image[/color] [color=7777FF][b]for[/b][/color] [b]([/b]Player group[b]([/b]p[b])[/b][b])[/b] [color=990066]Dialog[/color] - Fade Supply Cap Warning [color=990066]Image[/color] to a transparency of [color=FF7777]50.0[/color][b]%[/b] over a period of [color=FF7777]0.6[/color] seconds [color=7777FF][b]for[/b][/color] [b]([/b]Player group[b]([/b]p[b])[/b][b])[/b] General - Wait [color=FF7777]0.6[/color] Real [color=990066]Time[/color] seconds [color=990066]Dialog[/color] - Fade Supply Cap Warning [color=990066]Image[/color] to a transparency of [color=FF7777]100.0[/color][b]%[/b] over a period of [color=FF7777]0.6[/color] seconds [color=7777FF][b]for[/b][/color] [b]([/b]Player group[b]([/b]p[b])[/b][b])[/b] General - Wait [color=FF7777]0.6[/color] Real [color=990066]Time[/color] seconds Variable - [color=990066]Set[/color] free supply = [b]([/b][b]([/b]Player p Supplies Made[b])[/b] - [b]([/b]Player p Supplies Used[b])[/b][b])[/b] [color=990066]Dialog[/color] - Hide Supply Cap Warning [color=990066]Image[/color] [color=7777FF][b]for[/b][/color] [b]([/b]Player group[b]([/b]p[b])[/b][b])[/b] Variable - [color=990066]Set[/color] Supply Cap Warning Is Active[b][[/b]p[b]][/b] = False [/code]
select language
jass
> java
delphi
C++
php
GSL
galaxy
visualBasic
wurst
Text
Markdown
select style
default
> bbcode - default
Jasscraft
jasscraft html
visual
lightweight
lightweightNr
goto line:
Compare with:
text copy window
edit this code
post new code
Supply Warning Events Player - Player 0 Supplies Used changes Player - Player 1 Supplies Used changes Player - Player 2 Supplies Used changes ------- etc... Local Variables p = (Triggering player) <Integer> free supply = ((Player p Supplies Made) - (Player p Supplies Used)) <Integer> Conditions Supply Cap Warning Is Active[p] == False Actions Variable - Set Supply Cap Warning Is Active[p] = True General - While (Conditions) are true, do (Actions) Conditions free supply < 4 Actions Dialog - Show Supply Cap Warning Image for (Player group(p)) Dialog - Fade Supply Cap Warning Image to a transparency of 50.0% over a period of 0.6 seconds for (Player group(p)) General - Wait 0.6 Real Time seconds Dialog - Fade Supply Cap Warning Image to a transparency of 100.0% over a period of 0.6 seconds for (Player group(p)) General - Wait 0.6 Real Time seconds Variable - Set free supply = ((Player p Supplies Made) - (Player p Supplies Used)) Dialog - Hide Supply Cap Warning Image for (Player group(p)) Variable - Set Supply Cap Warning Is Active[p] = False