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
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
}
}
}
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 } } }