Function DebugGotoUnit
- Line
- 352
- Location
- cheats.j
- Constant?
- no
- Type
- function
- Arguments
- nothing
- Returns
- nothing
| 352 | function DebugGotoUnit takes nothing returns nothing |
| 353 | local group g = CreateGroup() |
| 354 | |
| 355 | set bj_debugGotoUnitX = 0 |
| 356 | set bj_debugGotoUnitY = 0 |
| 357 | set bj_debugGotoUnits = 0 |
| 358 | |
| 359 | call SyncSelections() |
| 360 | call GroupEnumUnitsSelected(g, GetTriggerPlayer(), null) |
| 361 | call ForGroup(g, function DebugGotoUnitEnum) |
| 362 | |
| 363 | if (bj_debugGotoUnits != 0) then |
| 364 | set bj_debugGotoUnitX = bj_debugGotoUnitX / bj_debugGotoUnits |
| 365 | set bj_debugGotoUnitY = bj_debugGotoUnitY / bj_debugGotoUnits |
| 366 | call SetCameraPositionForPlayer(GetTriggerPlayer(), bj_debugGotoUnitX, bj_debugGotoUnitY) |
| 367 | endif
|
| 368 | endfunction
|