This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:iscreeperinrange [2015/02/22 10:34] – created pawel345 | crpl:docs:iscreeperinrange [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| =====  IsCreeperInRange | =====  IsCreeperInRange | ||
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | |int x, int y, int range, int threshold, bool lessThan, bool square, bool AC| |'' | + | |int x, int y, int range, int threshold, bool lessThan, bool square, bool AC| ansber | 
| === Description === | === Description === | ||
| Checks if there is creeper in range of the x,y coordinates, | Checks if there is creeper in range of the x,y coordinates, | ||
| + | < | ||
| === Examples === | === Examples === | ||
| - | < | + | < | 
| + | $powerLineUnitX: | ||
| + | $powerLineUnitY: | ||
| + | |||
| + | $beamUnitX: | ||
| + | $beamUnitY: | ||
| + | |||
| + | $initialDelay: | ||
| + | |||
| + | once | ||
| + | GetUnitAt(< | ||
| + | GetUnitAt(< | ||
| + | endonce | ||
| + | |||
| + | |||
| + | if (not(< | ||
| + | Delay(< | ||
| + | TRUE -> | ||
| + | endif | ||
| + | |||
| + | @ActivatePowerPlant(not(IsCreeperInRange(CurrentX CurrentY 5 1 FALSE TRUE FALSE))) | ||
| + | |||
| + | |||
| + | : | ||
| + | -> | ||
| + | if (< | ||
| + | TRUE -> | ||
| + | SetImageColor(Self " | ||
| + | SetImageColor(< | ||
| + | SetScriptVar(< | ||
| + | PlaySound(" | ||
| + | else if (not(< | ||
| + | FALSE -> | ||
| + | SetImageColor(Self " | ||
| + | SetImageColor(< | ||
| + | SetScriptVar(< | ||
| + | PlaySound(" | ||
| + | endif endif | ||
| + | </ | ||