• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

help plz

Status
Not open for further replies.
Level 1
Joined
Apr 11, 2008
Messages
1
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 :(
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..
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
I think this is wrong.
JASS:
set tempPoint = GetRectCenter(gg_rct_belt)

If im right, your must add udg_ before, like this
JASS:
set udg_tempPoint = GetRectCenter(gg_rct_belt)

Try now

/Regards
 
Status
Not open for further replies.
Top