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
<pre class="jasscode">void a() <span class="style_comment">{</span> <span class="style_comment"> fixed distance; // local variable *distance* of type *real*</span> <span class="style_comment"></span> <span class="style_comment"> // .... your existing code</span> <span class="style_comment"></span> <span class="style_comment"> while (1) { // Repeat forever actiion</span> <span class="style_comment"> Wait(0.0625, c_timeGame); // << General - Wait Tick Period Game Time seconds</span> <span class="style_comment"> distance = // Set variable *distance*</span> <span class="style_comment"> DistanceBetweenPoints( // Distance Between Points</span> <span class="style_comment"> UnitGetPosition( // Position of unit</span> <span class="style_comment"> EventUnit() // Triggering Unit</span> <span class="style_comment"> ),</span> <span class="style_comment"> UnitGetPosition( // Position of unit</span> <span class="style_comment"> secretBane // saved variable of type *unit* - *secretbane*</span> <span class="style_comment"> )</span> <span class="style_comment"> )</span> <span class="style_comment"> ;</span> <span class="style_comment"> if (distance <= 1.0) { // Action if; condition - obvious</span> <span class="style_comment"> // sfi Reward Player Unlock Reward((Owner of (Picked unit)), Glaze - Flash) Trigger - Stop all instances of (Current trigger) Trigger - Turn (Current trigger) Off General - Break</span> <span class="style_comment"> }</span> } } </pre>
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
void a() { fixed distance; // local variable *distance* of type *real* // .... your existing code while (1) { // Repeat forever actiion Wait(0.0625, c_timeGame); // << General - Wait Tick Period Game Time seconds distance = // Set variable *distance* DistanceBetweenPoints( // Distance Between Points UnitGetPosition( // Position of unit EventUnit() // Triggering Unit ), UnitGetPosition( // Position of unit secretBane // saved variable of type *unit* - *secretbane* ) ) ; if (distance <= 1.0) { // Action if; condition - obvious // sfi Reward Player Unlock Reward((Owner of (Picked unit)), Glaze - Flash) Trigger - Stop all instances of (Current trigger) Trigger - Turn (Current trigger) Off General - Break } } }