There are a couple of ways to attach a trigger
name the trigger trig1
then in a units init,gamelogic script ect put this trig1 attachto [unitname,[0,0,0]]
0,0,0 are x,y,z so it can be offset.
Z won't work on triggers but will be the height if used to attach an object to an object.
Also
trig1 attachto [unitname]
would attach the trigger relative to the players position.
some objects usually small one can't be attached to anything using attachto.
You would then have to do it by moving it to the object in a loop
trig1 setpos [getpos unitname select 0, getpos unitname select 2, getpos unitname select 2, ];
this would have to be used in a loop or it would move to just the current location as a one off.
SaOk is right though as that's all you need in this case. Keep it simple when you can.