Jump to content

  • Curse Sites
Help

Arena 1,2,3 Frame moving script in 5.0.4


  • Please log in to reply
11 replies to this topic

#1 Jakeisbad

Jakeisbad
  • Members
  • Posts: 7
  • LocationFinland

Posted 30 August 2012 - 04:59 AM

Yo so I did one wargame today, and my old script what I used to move Arena frames seems like it's not working.
/run ArenaEnemyFrame1:SetPoint("topright",-435.80, -210.7)
That's the old script and it's impossible to move em with that dunno why.

#2 shxdxws

shxdxws
  • Members
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 1
  • Talents: Discipline 0/0/0/0/1/1

Posted 03 September 2012 - 04:46 AM

Looks like the frames are anchored in place on the Y axis, but not the X axis. Also, all of the other arena frames are no longer anchored to AF1, and therefore must be moved individually. Try this:


/run ArenaEnemyFrame1:SetPoint("TOPRIGHT",-435,0); ArenaEnemyFrame2:SetPoint("TOPRIGHT",-435,0); ArenaEnemyFrame3:SetPoint("TOPRIGHT",-435,0)

#3 Thaya

Thaya
  • Moderators
  • Posts: 2107
  • LocationRussia

Posted 03 September 2012 - 06:42 PM

No they aren't, at least I'm still able to move them anywhere I want with setpoint().

You need to make sure that the ArenaUI addon is running before you move them, i.e. the frames should actually exist. Run this:
/run LoadAddOn("Blizzard_ArenaUI") ArenaEnemyFrames:Show() ArenaEnemyFrame1:Show() ArenaEnemyFrame2:Show() ArenaEnemyFrame3:Show() ArenaEnemyFrame1CastingBar:Show() ArenaEnemyFrame2CastingBar:Show() ArenaEnemyFrame3CastingBar:Show()
Now what's changed in 5.0 is that they're no longer attached to each other, so you need to move the frames separately. Run ClearAllPoints just in case on all of them, too.
/run TR="TOPRIGHT" ArenaEnemyFrame1:ClearAllPoints() ArenaEnemyFrame2:ClearAllPoints() ArenaEnemyFrame3:ClearAllPoints() ArenaEnemyFrame1:SetPoint(TR,-435.80,-210.7) ArenaEnemyFrame2:SetPoint(TR,-435.80,-260.7) ArenaEnemyFrame3:SetPoint(TR,-435.80,-310.7)

And the last bit is, to prevent them from moving back into their original positions, we'll blank the SetPoint method for them. After this code is run they can't be moved until you reload - not by you, not by other addons, not by Blizzard UI. (I don't know what's resetting their position yet, so this is the best way to fix that for now.)

/run ArenaEnemyFrame1.SetPoint = function() end ArenaEnemyFrame2.SetPoint = function() end ArenaEnemyFrame3.SetPoint = function() end

Default UI Scripts - Compilation & how-to

#4 firebunny

firebunny
  • Premium Junkies
  • Curse Premium
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 118
  • Talents: Frost 0/2/0/2/2/.
  • LocationSouth Africa

Posted 03 September 2012 - 08:37 PM

/run local f=ArenaEnemyFrame1; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

/run local f=ArenaEnemyFrame2; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

/run local f=ArenaEnemyFrame3; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

Should work fine.
Move them with your mouse.
Posted Image

#5 Thaya

Thaya
  • Moderators
  • Posts: 2107
  • LocationRussia

Posted 03 September 2012 - 09:56 PM

View Postfirebunny, on 03 September 2012 - 08:37 PM, said:

/run local f=ArenaEnemyFrame1; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

/run local f=ArenaEnemyFrame2; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

/run local f=ArenaEnemyFrame3; f:SetMovable(true) f:EnableMouse(true) f:SetUserPlaced(true) f:SetScript('OnMouseDown',f.StartMoving) f:SetScript('OnMouseUp',f.StopMovingOrSizing)

Should work fine.
Move them with your mouse.
There's something resetting their position in 5.0.
Default UI Scripts - Compilation & how-to

#6 firebunny

firebunny
  • Premium Junkies
  • Curse Premium
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 118
  • Talents: Frost 0/2/0/2/2/.
  • LocationSouth Africa

Posted 03 September 2012 - 10:20 PM

Ah... I suppose you could just set their coords with a macro everytime you enter arena for now.. Will look at it when I can find people to do war games :|
Posted Image

#7 Prozaak

Prozaak
  • Members
  • Posts: 19

Posted 05 September 2012 - 04:32 PM

i improved Thaya Script:

.TOC File:
## Interface: 50001
## Title: Arena Frames
ArenaFrames.lua
LoadOnDemand: 1
LoadWith: Blizzard_ArenaUI

.LUA File:

local function myArenaStuff()

ArenaEnemyFrame1:ClearAllPoints();ArenaEnemyFrame1:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -280);ArenaEnemyFrame2:ClearAllPoints();ArenaEnemyFrame2:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -340);ArenaEnemyFrame3:ClearAllPoints();ArenaEnemyFrame3:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -400)
ArenaEnemyFrame1.SetPoint = function() end ArenaEnemyFrame2.SetPoint = function() end ArenaEnemyFrame3.SetPoint = function() end

end

if IsAddOnLoaded("Blizzard_ArenaUI") then
	myArenaStuff()
else
	local f = CreateFrame("Frame")
	f:RegisterEvent("ADDON_LOADED")
	f:SetScript("OnEvent", function(self, event, addonName)
		if addonName ~= "Blizzard_ArenaUI" then
			return
		end

		myArenaStuff()

		self:UnregisterEvent("ADDON_LOADED")
		self:SetScript("OnEvent", nil)
	end)
end

Its working for me at the moment, someone else can test?

#8 varellz

varellz
  • Junkies
  • Humanclass_name
  • EU-Aegwynn
  • Blutdurst
  • Posts: 355
  • Talents: Assassination 2/2/1/2/0/0
  • 2v2: 2128
  • 3v3: 2445
  • RBG: 1717
  • LocationGermany

Posted 11 September 2012 - 08:37 PM

View PostProzaak, on 05 September 2012 - 04:32 PM, said:

i improved Thaya Script:

.TOC File:
## Interface: 50001
## Title: Arena Frames
ArenaFrames.lua
LoadOnDemand: 1
LoadWith: Blizzard_ArenaUI

.LUA File:

local function myArenaStuff()

ArenaEnemyFrame1:ClearAllPoints();ArenaEnemyFrame1:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -280);ArenaEnemyFrame2:ClearAllPoints();ArenaEnemyFrame2:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -340);ArenaEnemyFrame3:ClearAllPoints();ArenaEnemyFrame3:SetPoint("BOTTOM", Minimap, "BOTTOM", -150, -400)
ArenaEnemyFrame1.SetPoint = function() end ArenaEnemyFrame2.SetPoint = function() end ArenaEnemyFrame3.SetPoint = function() end

end

if IsAddOnLoaded("Blizzard_ArenaUI") then
myArenaStuff()
else
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addonName)
if addonName ~= "Blizzard_ArenaUI" then
return
end

myArenaStuff()

self:UnregisterEvent("ADDON_LOADED")
self:SetScript("OnEvent", nil)
end)
end

Its working for me at the moment, someone else can test?

Works for me, but can u tell me how to set up the scale for the frames via script?

/run ArenaEnemyFrame1:SetScale(1.2)
/run ArenaEnemyFrame2:SetScale(1.2)
/run ArenaEnemyFrame3:SetScale(1.2)

this works as macro, but just putting in

ArenaEnemyFrame1:SetScale(1.2)
ArenaEnemyFrame2:SetScale(1.2)
ArenaEnemyFrame3:SetScale(1.2)
in the lua file is not working :-/


edit:

got it

local function myArenaStuff()

ArenaEnemyFrame1:ClearAllPoints();ArenaEnemyFrame1:SetPoint("BOTTOM", Minimap, "BOTTOM", -470, -50);ArenaEnemyFrame2:ClearAllPoints();ArenaEnemyFrame2:SetPoint("BOTTOM", Minimap, "BOTTOM", -470, -125);ArenaEnemyFrame3:ClearAllPoints();ArenaEnemyFrame3:SetPoint("BOTTOM", Minimap, "BOTTOM", -470, -200)
ArenaEnemyFrame1:SetScale(1.2);ArenaEnemyFrame2:SetScale(1.2);ArenaEnemyFrame3:SetScale(1.2)
ArenaEnemyFrame1.SetPoint = function() end ArenaEnemyFrame2.SetPoint = function() end ArenaEnemyFrame3.SetPoint = function() end

end

if IsAddOnLoaded("Blizzard_ArenaUI") then
	 myArenaStuff()
else
	 local f = CreateFrame("Frame")
	 f:RegisterEvent("ADDON_LOADED")
	 f:SetScript("OnEvent", function(self, event, addonName)
			 if addonName ~= "Blizzard_ArenaUI" then
					 return
			 end

			 myArenaStuff()

			 self:UnregisterEvent("ADDON_LOADED")
			 self:SetScript("OnEvent", nil)
	 end)
end

don't know why its working now... but i'm happy with it, anyone got script for trinkets? :o

Edited by varellol, 11 September 2012 - 08:58 PM.


#9 Abidalzim

Abidalzim
  • Junkies
  • Taurenclass_name
  • EU-Sylvanas
  • Rampage / Saccage
  • Posts: 315
  • Talents: Enhancement 0/2/1/1/0/0
  • RBG: 1740

Posted 16 November 2012 - 05:25 PM

View PostProzaak, on 05 September 2012 - 04:32 PM, said:

i improved Thaya Script
Thanks, I can finally see again!
Zaka pa te če naja morš te ne, te pa če pa te ne čuj, kaj te to te je, ne?

#10

  • Junkies
  • Taurenclass_name
  • US-Tichondrius
  • Bloodlust
  • Talents: Feral 1/0/2/2/1/0
  • RBG: 2214
  • LocationOKC

Posted 25 November 2012 - 08:25 PM

View PostAbidalzim, on 16 November 2012 - 05:25 PM, said:

Thanks, I can finally see again!
dot

thanks

#11

  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Talents: Fire 0/2/2/2/1/2
  • RBG: 2573

Posted 07 February 2013 - 02:25 PM

anyway of resizing the mouse move macro?

#12 Deicidium

Deicidium
  • Members
  • Posts: 1

Posted 10 July 2013 - 10:49 AM

bump for trinkets <3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<