Jump to content

  • Curse Sites
Help

Warlock Pet Frame Troubles

thayasaveme

  • Please log in to reply
10 replies to this topic

#1

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 15 September 2013 - 12:18 AM

Hey there, I've decided to pick up warlock as an alt again this season and I noticed a few issues while leveling.

I've played melee classes since TBC so I've long been used to a unit frame layout similar to neilyo, khuna etc. This has obviously required me to move my pet frame and I've had no problem doing so on other classes such as mage, but when I do so on my lock the frame bugs out. My pet frame is automatically moving to its default position under the player frame but for me this covers my target frame and debuffs. Something triggers this during combat and I'm pretty sure its when I generate a soul shard, it doesn't matter where I place the frame and I've tried doing so with MoveAnything and the macro provided in the default UI scripts sticky.

Does anyone have an idea how I can get around this? I've been lvling with GoSac for now to ignore the problem but I'm nearing 90. I can post screenshots later if needed.

#2 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 180

Posted 15 September 2013 - 04:33 AM

you need to know the position where your PetFrame should be!
complete the if conditions (point, relativeTo, relativePoint, xPos, yPos)

local f = CreateFrame("Frame")
f:SetScript("OnUpdate", function()
local point, relativeTo, relativePoint, xPos, yPos = PetFrame:GetPoint()
if point=="" and relativeTo=="" and relativePoint=="" xPos=="" and yPos=="" then
  return
else
  PetFrame:ClearAllPoints()
  PetFrame:SetPoint(point, relativeTo, relativePoint, x, y)
end
end)


example..:
local f = CreateFrame("Frame")
f:SetScript("OnUpdate", function()
local point, relativeTo, relativePoint, xPos, yPos = PetFrame:GetPoint()
if point=="BOTTOM" and relativeTo=="PlayerFrame" and relativePoint=="TOP" xPos=="-20" and yPos=="50" then
  return
else
  PetFrame:ClearAllPoints()
  PetFrame:SetPoint("BOTTOM", PlayerFrame, "TOP", -20, 50)
end
end)


#3

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 15 September 2013 - 10:58 AM

Thanks a lot, I'll give it a try later.

#4 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 180

Posted 15 September 2013 - 11:51 AM

Sry this was bullshit, i forgot that the PetFrame is protected, so it would cause massive taint while in combat...

do you still used the following?!

PetFrame:SetPoint(....)
PetFrame.SetPoint = function() end


#5

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 15 September 2013 - 02:25 PM

Sorry I'm not very familiar with scripts.

I don't directly use that at the moment (knowingly) but I have moved the pet frame with MoveAnything. I didn't get around to trying the code that you gave me at first. I've also tried moving the frame with the macro to make the frame draggable but that didn't work either and the frame would move in combat when something happened with soul shards.

#6 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 180

Posted 15 September 2013 - 03:32 PM

View PostJonadefty, on 15 September 2013 - 02:25 PM, said:

Sorry I'm not very familiar with scripts.

I don't directly use that at the moment (knowingly) but I have moved the pet frame with MoveAnything. I didn't get around to trying the code that you gave me at first. I've also tried moving the frame with the macro to make the frame draggable but that didn't work either and the frame would move in combat when something happened with soul shards.

use this Macro for the pet movement: (replace X and Y with coordinates of your choice)
/run PetFrame:ClearAllPoints(); PetFrame:SetPoint("CENTER", UIParent, X, Y)


and this macro to lock the position (to unlock "/reload")
/run PetFrame.SetPoint = function() end


#7

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 15 September 2013 - 04:43 PM

Ah I see, I didn't understand the purpose of the second line you gave me in the script. I'll try it in addon form and see if it would work fine, would reloading cause it to unlock even if I used the script rather than the macros?

#8 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 180

Posted 15 September 2013 - 05:31 PM

if you use the PLAYER_ENTERING_WORLD event to trigger the script it will be locked every time you /reload

#9

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 15 September 2013 - 06:24 PM

Would you mind providing the entire script I would need for the addon to work properly?

The coordinates I need are -423, 7.

I can get this to work in a macro, but I want it to load whenever I log in so I attempted to make an addon for the first time. I can get the addon to show in the addons menu but it wont move the frame as intended.

Thanks for all the help so far though.

#10 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 180

Posted 16 September 2013 - 10:18 AM

Addon:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function()
  PetFrame:ClearAllPoints();
  PetFrame:SetPoint("CENTER", UIParent, -423, 7);
  PetFrame.SetPoint = function() end
end)

macro:
/run PetFrame:ClearAllPoints(); PetFrame:SetPoint("CENTER", UIParent, -423, 7); PetFrame.SetPoint = function() end


#11

  • Members
  • Undeadclass_name
  • EU-Kor'gall
  • Cruelty / Crueldad
  • Talents: Subtlety

Posted 16 September 2013 - 02:49 PM

Thanks for all the help!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<