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