WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Range check (https://www.wowinterface.com/forums/showthread.php?t=56193)

GreyFox777 04-29-18 03:07 AM

Range check
 
Hello guys, can you help me please?

Im trying to make the range check for party1target, but it should parent to party1 frame.

How it works for me:

If player are too far away from party1 then party1 alpha is 0.6
If the target of party1 not too far away, then alpha is set to 1.

But it should work, like so:

If party1target is in range but party1 not, then it should set the alpha to 0.6 to both frames...


My code at the bottom of lua file

Lua Code:
  1. self.Range = cfg.frames.range

Any way to modify it?


Have also attached a range lua file from oUF

neverg 04-29-18 05:24 AM

Range only works based on the player frame, that is, you cannot check range between other frames. WoW API doesn't support it. :)
It would lead to abuse.

GreyFox777 04-29-18 05:38 AM

But strange, because i have worked WeakAuras that does it. So it possible, im sure.

GreyFox777 04-29-18 05:56 AM

or is there a way to set the parent on party frame but, with ability to correct the frame strata?


I tried parent and it work well, but frame strata goes crazy then...

neverg 04-29-18 06:40 AM

I might be wrong then. :)
Thought it was only possible to check ranged between the player frame.
Someone can correct me if that is not the case.

GreyFox777 04-29-18 08:53 AM

i think you right and oUF range doesen't work with ***target frames... Sadly.


But maybe is there a way to set alpha to a frame if another frame setted to alpha and copy this value?



I tried with

Quote:

frame_4:SetAlpha(Texture2:GetEffectiveAlpha())
but that doesen't work with any changed alpha in game.

neverg 04-29-18 09:17 AM

Quote:

Originally Posted by GreyFox777 (Post 327808)
i think you right and oUF range doesen't work with ***target frames... Sadly.


But maybe is there a way to set alpha to a frame if another frame setted to alpha and copy this value?



I tried with



but that doesen't work with any changed alpha in game.

Don't think that will work, there is no Event attached to it. It will always read the same value. :)

GreyFox777 04-29-18 09:29 AM

But is there no way for douing that?!

All my party target frame are not affected by alpha :(

Seems a little not good

GreyFox777 05-01-18 07:04 PM

I did it myself by setting parent.

Thread can be deleted.


All times are GMT -6. The time now is 06:11 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI