- Joined
- Oct 23, 2011
- Messages
- 182
Hello
My code is glitching and I need some help!
The actions don't work for some reason
My code is glitching and I need some help!
The actions don't work for some reason
JASS:
library Teleport initializer onInit
//The part that's glitching
//! textmacro CreateMovePoint takes LETTER, moveX, moveY
private function move$LETTER$ takes nothing returns boolean
call SetUnitX(GetTriggerUnit(), $moveX$)
call SetUnitY(GetTriggerUnit(), $moveY$)
return false
endfunction
//! endtextmacro
//! textmacro CreateTeleport takes minX, minY, maxX, maxY, LETTER
set trg = CreateTrigger()
set reg = CreateRegion()
set rct = Rect($minX$, $minY$, $maxX$, $maxY$)
call RegionAddRect(reg, rct)
call RemoveRect(rct)
call TriggerRegisterEnterRegion(trg, reg, null)
call TriggerAddCondition(trg, Condition(function move$LETTER$))
//! endtextmacro
//! runtextmacro CreateMovePoint("a", "-8295", "-18465")
private function onInit takes nothing returns nothing
local trigger trg
local region reg
local rect rct
//! runtextmacro CreateTeleport("-5225", "-23325", "-4915", "-23045", "a")
set trg = null
set reg = null
set rct = null
endfunction
endlibrary