Quantcast
Clear raid target markers - WoWInterface
Thread Tools Display Modes
07-15-20, 12:31 PM   #1
Naruos
A Defias Bandit
Join Date: Apr 2009
Posts: 3
Question Clear raid target markers

I want to clear the Raid Targets from everyone in the raid.

At the moment,
Lua Code:
  1. for i=8,0,-1 do SetRaidTarget("player", i); end
is the only way I've found, but I figure I've missed something obvious. This way, all eight markers gets spammed as system messages.

I know that I have
Code:
/cwm 0
for the World Markers and thus there should be a better way to clear the target markers as well.

What am I missing?
  Reply With Quote
07-15-20, 12:59 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,265
Code:
SetRaidTarget("unit", 0)
See: SetRaidTarget
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-15-20, 01:50 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,932
Originally Posted by Fizzlemizz View Post
Code:
SetRaidTarget("unit", 0)
See: SetRaidTarget
Not exactly what the OP is asking for. Their posted loop does this in its last pass to clean up the mark on the player.

Unfortunately, there isn't a "clear marker by index" function like there is for world markers.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-15-20 at 01:56 PM.
  Reply With Quote
07-15-20, 04:10 PM   #4
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 496
The 0 index is exactly what OP is asking for. What OP wants is an easy way to clear all markers off the group without spamming messages. The 0 index at the end of the loop only clears the last marker off of OP, after spamming all marks on themselves to clear from the group.

Instead of the 0-8 loop, OP needs to loop through all group units using the 0 index. This will clear any marker they have with no message. This is easy with the group, but harder with non-group units, especially if a mark is on something that is still alive but no longer a valid unit.
  Reply With Quote
07-15-20, 06:52 PM   #5
Naruos
A Defias Bandit
Join Date: Apr 2009
Posts: 3
Originally Posted by Kanegasi View Post
Instead of the 0-8 loop, OP needs to loop through all group units using the 0 index. This will clear any marker they have with no message. This is easy with the group, but harder with non-group units, especially if a mark is on something that is still alive but no longer a valid unit.
You mean something like
Lua Code:
  1. s = IsInRaid() and "raid" or "party" ; for i = 1, GetNumGroupMembers() do u = s..i ; SetRaidTarget(u, 0); end
?

Yeah, that works for the raid I guess. I must admit I didn't realize it when I posted, that I worded my question to be about the raid members specifically. Well, at least I have my answer either way. I either accept the spam, or I clear it off raid members only.

If only IsRaidMarkerActive() hadn't returned the status for world markers instead of raid markers (or at least that's how I understood it), I could have used that to minimize the spam.

Thanks all of you for the help

Last edited by Naruos : 07-15-20 at 06:57 PM.
  Reply With Quote
07-16-20, 10:23 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,932
I was imagining situations where you have stray markers on mobs that don't have a valid UnitID, which would be a problem too.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Clear raid target markers

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off