무야호야
2023-11-17 15:56
조회: 1,283
추천: 0
좀 어려운 위크오라인데 도와주실 수 있나요?Reddit 에서 굉장히 좋은 위크오라를 발견해서 가져와보려는데 (https://www.reddit.com/r/wow/comments/ssds9k/only_show_weakaura_when_enough_enemies_in_range/) 생략된게 좀 있어서 그런지 온전히 가져오지를 못하겠네요. [8 range 안에 3명 이상의 적이 있을 때, 위크오라 아이콘을 띄운다] 이 방식에 대해 토론하는 게시글입니다. 댓글의 RealDuckyTV 라는 사람이 그거에 관한 코드를 짜줬는데 그 코드의 전문이 이렇습니다. function() -- Set the current time to throttle the amount of iterations local theTime = GetTime() -- Set the range to check local range = 8 -- Set the minimum number of units required to activate local minUnits = 3 -- Only continue if our last check was atleast 0.25s ago, or we havent checked yet. if not aura_env.last or aura_env.last < theTime - 0.25 then -- Set the last check time to now. aura_env.last = theTime -- Reset the counter local counter = 0 -- Iterate the maximum number of nameplates that can be on screen for i = 1, 40 do -- Create the UnitID for each nameplate local unit = "nameplate"..i -- Check if the unit exists in memory, they are not friendly, and are within range. if UnitExists(unit) and not UnitIsFriend("player", unit) and WeakAuras.CheckRange(unit, range, "<=") then -- If we get here, it was all true, so Increment counter counter = counter + 1 -- If our counter is the min units to activate, we break because we dont care about any further units. if counter >= minUnits then break end end end -- Set the aura variable for use outside of this object (Not necessary for this but its not a performance loss) aura_env.targets = counter end -- If the number of units at least our minimum number of units, we return true and activate the aura return aura_env.targets >= minUnits end 굉장히 친절하게 중간에 주석까지 넣어줘서 만들어줬는데요. 문제는 이 코드만 가지고는 제가 위크오라를 만들 수가 없더라구요. 주석을 읽어보니까, 거리 8 안에 적이 3명 있을 때 ture 값?을 가진 코드 같은데 이를 이용하여, 거리 8 안에 적이 3명 있고 + 폭풍의 칼날이 재사용대기시간이 아닐 때 위크오라 아이콘이 뜨게 하는 방법이 있을까요??
EXP
1,254
(27%)
/ 1,401
무야호야
|
인벤 공식 앱
댓글 알람 기능 장착! 최신 게임뉴스를 한 눈에 보자