08-09-12, 12:02 AM | #1 |
Raid frames not spawning properly
When I log in or reload, the units in my raid frames spawn all stacked up on top of each other. If I move a player into another group, they all get fixed (this is with only two people in the raid, though; I haven't been able to get more people to help me test things yet).
I found some code from zork for raid frame creation (http://www.wowinterface.com/forums/s...t=42538&page=2) and implemented it into the layout I've been working on as a learning platform. I know the code worked before I tinkered with it, but I can't figure out where my tinkering went wrong to cause an issue like this. The tinkering I did was to make the frames moveable. The code I use to move them and save their positions works for my other frames such as player, target, pet, party, etc, and it works for the raid frames after doing what I said above to fix them; it's just on the initial load that they're acting weirdly Lua Code:
Lua Code:
Lua Code:
|
|
08-09-12, 01:30 AM | #2 |
When dealing with raid frames it's best to create a separate movable dummy frame and then anchor the first Header(not unit) to that. Making each raid unit movable doesn't work since the header already does that internally.
|
|
08-09-12, 01:50 AM | #3 |
I don't make each moveable; the Gen_Mover function creates the frames I use to move other frames (1 mover per frame type, so only 1 raid mover). All I do is anchor the frame I want to move to the mover frame when unlocked and de-anchor it when the frames get locked, and I said in the op, the initial load is the only time it does this. After changing a player's group in the raid, the raid frames show up as normal (even after moving the person back to the original group); they also can be locked/unlocked/moved around just fine.
Edit again: The reason I touch the specific unit button at all (and only on the party), is because when I tried it with the header, the party frames didn't move with the mover frame, though they would pop over to where the mover was after a reload. Once I set it up the way it's set up now, they moved around just fine. Also, that's only done on the party frames; when it gets a raid frame, it only messes with the group headers. Last edited by dragonrealms : 08-09-12 at 02:01 AM. |
|
08-09-12, 02:24 AM | #4 |
Your still moving the unit, instead of the header that creates the unit. Try using the gen_mover and moveable on the headers you created rather than each unit that is spawned.
|
|
08-09-12, 03:32 AM | #5 |
I did originally try that before I even implemented raid frames and was just sitting on party frames. The mover frame moved, but the rest of the party frames stayed put until I reloaded. And again, the raid frames portion moves the group headers (if it's a raid style, I send lib.moveable the unit's parent, which would be the header as I understand it); the party portion, as I've admitted, is moving the first party unit button because I couldn't get it working any other way (mover moved, party did not follow), and if the frame is neither party nor raid, there's no header for it anyway.
I'm not trying to be argumentative here, but you're telling me to do something I've already tried and to do it to something that's producing the results I expect (again, if it's a raid unit, the move function is already being sent the header not the unit itself). I should also say that yes, I do understand that the way the party frames are getting moved is not the "right" way to do it, but it IS working whereas the raid frames aren't 100% working by using the headers, so the party frames currently being "wrong" isn't a priority for me right now; rather, I'm viewing that as something to clean up later when everything is working as I expect. Last edited by dragonrealms : 08-09-12 at 03:41 AM. |
|
08-09-12, 07:40 AM | #6 | |
Check
http://code.google.com/p/rothui/sour.../party.lua#208 or http://code.google.com/p/rothui/sour...s/raid.lua#467 It shows how to work with a dragFrame on header units. Don't get disturbed by my raid frames. I spawn 3 different raids that will show/hide based on macro condtions. The raid frames use different scaling that's why. On the other side...you could just remove the drag functionality and use the oUF_MovableFrames module.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 08-09-12 at 07:44 AM. |
||
08-09-12, 02:18 PM | #7 |
Thanks zork. I did understand what your code was doing (and liked the functionality of it which is why I used it). I just am not able to figure out why the initial spawn gets all the units stacked on top of each other until a player group switch happens.
As for the oUF_MovableFrames plugin, I eventually want to make more than just unit frames, so that really wouldn't be an answer for me down the road when I want to move things that aren't based off the oUF framework because they're out of its scope of functionality, and I'd end up having to make my own move capability anyway; may as well just learn how to do it now so I can use it whenever I come to that point. |
|
08-10-12, 04:22 AM | #8 |
Got it working properly now. Thanks for the code links, zork; they helped a lot. I had the right idea of what to do, but your code helped me iron out the implementation a lot more cleanly.
|
|
WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Raid frames not spawning properly |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|