Wednesday, August 24, 2011

Vanilla unit frames

How to move the unit frames without using an addon

Move player unit frame
/script PlayerFrame:SetMovable(1)PlayerFrame:StartMoving()
Then move around your mouse and the frame will move.

Stop moving player unit frame
/script PlayerFrame:StopMovingOrSizing()PlayerFrame:SetMovable()

Move target unit frame
/script TargetFrame:SetMovable(1)TargetFrame:StartMoving()

Stop moving target unit frame
/script TargetFrame:StopMovingOrSizing()TargetFrame:SetMovable()

Target of target will move after the target unit frame


6 comments:

  1. code to get the name of mouseover frame
    /script ChatFrame1:AddMessage("frame name: " .. GetMouseFocus():GetName())

    ReplyDelete
    Replies
    1. Trying to combine these macros to make a single macro that when pushed once, allows movement of the frame the mouse is on, then when pushed again, locks that frame in place. Any ideas?

      Delete
  2. How to resize player or target frame?

    ReplyDelete
  3. What if i want reset bar to default position or size? Which command i need to use?

    ReplyDelete
  4. https://wow.gamepedia.com/Making_draggable_frames

    ReplyDelete