im super new to jass (started learning today) i made a trigger to move a unit to a region, and then i learned about memory leaks so i tried to eliminate it, but the trigger wont work properly. it does everything except move the unit? whats wrong with it
it doesnt do much because im just playing around with things at the moment. and i cant find any guides that help, all use center of (playable map area) and the same script for that wont work for me so i assume its something different for regions..
JASS:
function Trig_Capture_Actions takes nothing returns nothing
set tempPoint = GetRectCenter(gg_rct_belt)
call SetUnitOwner( GetSpellTargetUnit(), GetTriggerPlayer(), false )
call AddSpecialEffectLocBJ( GetUnitLoc(GetSpellTargetUnit()), "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
call SetUnitPositionLoc( GetSpellTargetUnit(), udg_tempPoint )
call RemoveLocation ( udg_tempPoint )
endfunction
it doesnt do much because im just playing around with things at the moment. and i cant find any guides that help, all use center of (playable map area) and the same script for that wont work for me so i assume its something different for regions..