Show frost mage icicle as part of UI
I want to write addon which will show frost mage icicles around the character (at predetermined positions of the screen). I want them to rotate slowly with some animation (and being 3D, of course). Is it possible with addon API or I should stick with 2D images? How do I find 3D object name for icicle? Will it hurt performance (I don't expect it, there are plenty of 3D objects in the scene and 5 more probably won't make a difference)?
|
Well, surprisingly I was able to use WeakAuras to find that model. It's spells/cfx_mage_iciclemastery_launchedmissile.m2 and considering that WeakAuras can display it, I should be able too.
|
I don't think we are allowed access to the 3D environment. You would have to place textures on the screen (not necessarily around the player but around the centre of the screen and activate them as the number of icicles increase. but seeing as the built in functionality does a smaller version of this over the players head is it just the requirement to make the icicles bigger?
|
Quote:
|
Without looking into it too much I think the Icicles are stored as a buff on your character.
So, I would do the following to turn this into an addon.. 1. Set up the texture points around the screen and fill it with the icile image but set the alpha value for the texture to 0 to make it invisible. 2. Monitor the player's buffs for the Icicle Buff and keep a record of how many icicles are available. 3. Cycle through the texture points and turn off/on the icicles you want based on the number available. It sounds simple but it could be harder than it seems. However, you probably won't be able to turn off Blizzards icicle display so the effect will be repeated .. but while testing this is a bonus as your addon should match the blizzard version. |
And I think the rotate idea will be possible with animation .. however, I am not sure animation works during combat. So bear that in mind.
|
I have troubles rotating model over Z axe. Here's my code to show icicle:
Code:
local frame = CreateFrame("PlayerModel", "IciclesFrame", nil); |
You won't be able to rotate over z axis as that would imply addons can draw in the 3D space. As far as I know textures will only rotate over x <> and y v^ axes.
|
Quote:
|
Quote:
Have you looked at the animation functionality to see how you apply the rotations? This is the rotation part of the Animation notes on wowpedia. None of which references a 3rd dimension. https://wow.gamepedia.com/Widget_API#Rotation |
I don't really know, but, it seems to me that you can rotate (or work with) those models like that simply because they are "hard programed" into the game in its' base programming, and it is something that we are not allowed to mess with.
I.E. - We can add graphics to the game (in addons, and such) but we are NOT allowed to mess around with the 3D world. That is a "hands off" area. By-the-way, not having access to the z-axes has been a"thorn in the side" for anyone working on a mapping addon from the beginning. In my defense, I must say that I have not been able to play the game for two years now and I don't see any way that I'm ever going to again. But, I've [b][i]TRIED[\I][\B] to stay up with the changes to the game. Although it may not have worked that well. :o |
Quote:
Quote:
Code:
local ag = frame:CreateAnimationGroup(); I also tried to create parent frame for model frame and rotate it. It rotated, but model frame inside did not rotate. |
Quote:
Quote:
Quote:
If we look at the root of the PlayerModel and look at Model itself it may prove informative. https://wow.gamepedia.com/Widget_API#Model It gives the impression you can load your own models as long as they are of the right format. Has anyone done anything similar that inspired you ? If so, maybe look at how they implemented their magic. To be honest, I don't think you will better what the game already does with the icicle animation. If you want to have a permanent display of your icicles I'd settle for the 2D images spaced out at a location that suits your gameplay and activate them when required and within the realms of in combat UI changes. With the built in icicle display doing the 3D animation stuff it already does. Edit: Tried playing with the Model frame but with no examples it made for a non successful result. Edit2: Tried the following block of code .. Lua Code:
The Arthas model appeared ( black color only ) but the icicle model you provided ( with the mdx extension that they use for backward compatibility ) doesn't display or error. However, there is no rotation function but it is possible that rotation animation in combination with the SetPosition(x,y,z) may work. But this is a moot point if the icicle won't display using this model frame. |
Quote:
Code:
local bgFrame = CreateFrame("Frame", nil, UIParent); Quote:
Quote:
|
All times are GMT -6. The time now is 03:20 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI