Thread Tools Display Modes
01-09-06, 10:18 AM   #1
UnknownAngel
A Defias Bandit
Join Date: Jan 2006
Posts: 3
Scripting Help DART/DUF

heya.. I love these Mods more then anything... DART, DUF, DAB, DFM =)

but Im pulling my hair out trying to put the final touches on it...

Im trying to make two scripts...

One is to Show and Hide an Artwork frame for when I join and Raid group..

the other is to show and hide an Artwork frame for when I have a pet out.

Any help on this would be wonderful.

Thank You!
  Reply With Quote
01-09-06, 12:29 PM   #2
Lozareth
An Onyxian Warder
 
Lozareth's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 366
OnLoad:
this:RegisterEvent("RAID_ROSTER_UPDATE");

OnEvent:
if GetNumRaidMembers() > 0 then
DART_Show(ti);
else
DART_Hide(ti);
end

--------------------------------------------------------

OnLoad:
this:RegisterEvent("UNIT_PET");

OnEvent:
if UnitExists("pet") then
DART_Show(ti);
else
DART_Hide(ti);
end
__________________
High Pope of the Divine Chihuahua
http://www.discordmods.com
  Reply With Quote
01-09-06, 02:29 PM   #3
UnknownAngel
A Defias Bandit
Join Date: Jan 2006
Posts: 3
thank you soooo very much, Lozareth!!

It worked perfectly!!

*huggles*
  Reply With Quote
01-09-06, 04:43 PM   #4
Stachel
A Murloc Raider
 
Stachel's Avatar
Join Date: Jan 2006
Posts: 5
Originally Posted by Lozareth
OnLoad:
this:RegisterEvent("RAID_ROSTER_UPDATE");
....
What would the script look like if I want to show/hide the texture for my specific target?
__________________
Allt Svartnar - Allein unter Menschen
  Reply With Quote
01-11-06, 05:14 PM   #5
Stachel
A Murloc Raider
 
Stachel's Avatar
Join Date: Jan 2006
Posts: 5
Could someone please answer my question?

Many thanks.
__________________
Allt Svartnar - Allein unter Menschen
  Reply With Quote
01-11-06, 09:38 PM   #6
Lozareth
An Onyxian Warder
 
Lozareth's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 366
Your question doesn't provide enough info? "for my specific target" Huh? What does that mean? Hide/show when you have/don't have a target? When you're targetting something with a specific name? When you're targetting a hostile? What?
__________________
High Pope of the Divine Chihuahua
http://www.discordmods.com
  Reply With Quote
01-12-06, 01:45 PM   #7
Stachel
A Murloc Raider
 
Stachel's Avatar
Join Date: Jan 2006
Posts: 5
Originally Posted by Lozareth
Your question doesn't provide enough info? "for my specific target" Huh? What does that mean? Hide/show when you have/don't have a target? When you're targetting something with a specific name? When you're targetting a hostile? What?

Oh, I'm sorry. My english isn't the best.

"Hide/show when you have/don't have a target?" <-- Thats what I'm looking for. I'd like to hide the texture I use for the target frame.
__________________
Allt Svartnar - Allein unter Menschen
  Reply With Quote
01-12-06, 03:08 PM   #8
Roane
A Theradrim Guardian
Join Date: Jan 2006
Posts: 66
Are you replacing your target frame with that texture, or is it a background for your target frame? Assuming it's the latter, I think that in most cases if you anchor a texture on a frame, hiding that frame will also hide the attached texture.
  Reply With Quote
01-12-06, 03:51 PM   #9
Apate
An Aku'mai Servant
 
Apate's Avatar
Join Date: Jan 2006
Posts: 38
Originally Posted by Stachel
Oh, I'm sorry. My english isn't the best.

"Hide/show when you have/don't have a target?" <-- Thats what I'm looking for. I'd like to hide the texture I use for the target frame.

I did this with my textures, but being at work, I don't have the specifics, so I'll say this:
onload: this:RegisterEvent(PLAYER_TARGET_CHANGED)
OnEvent: if UnitExists("target") DART_Show(#) else DART_Hide(#)

something along those lines. if you can't figure it out, prod me until I give you the scripts i have at home or until someone else answers
  Reply With Quote
01-12-06, 04:18 PM   #10
Stachel
A Murloc Raider
 
Stachel's Avatar
Join Date: Jan 2006
Posts: 5
Originally Posted by Apate
I did this with my textures, but being at work, I don't have the specifics, so I'll say this:
onload: this:RegisterEvent(PLAYER_TARGET_CHANGED)
OnEvent: if UnitExists("target") DART_Show(#) else DART_Hide(#)

something along those lines. if you can't figure it out, prod me until I give you the scripts i have at home or until someone else answers

Didn't worked.

Always get two error-strings.

Originally Posted by Roane
Are you replacing your target frame with that texture, or is it a background for your target frame? Assuming it's the latter, I think that in most cases if you anchor a texture on a frame, hiding that frame will also hide the attached texture.
What is the target frame called within DART?
__________________
Allt Svartnar - Allein unter Menschen
  Reply With Quote
01-12-06, 07:19 PM   #11
Roane
A Theradrim Guardian
Join Date: Jan 2006
Posts: 66
Originally Posted by Stachel

What is the target frame called within DART?
It's not a DART frame. Does DART have a frame finder built in like DFM does? I can't remember offhand. Either way, use the frame finder from one of those mods and mouseover your target frame to see what it's called. I think it's different depending on your mod. If you're using DUF, it's DUF_TargetFrame.
  Reply With Quote
01-12-06, 09:52 PM   #12
Lozareth
An Onyxian Warder
 
Lozareth's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 366
OnLoad:
this:RegisterEvent("PLAYER_TARGET_CHANGED")

OnEvent:
if UnitName("target") DART_Show(ti) else DART_Hide(ti) end



Fixed.
__________________
High Pope of the Divine Chihuahua
http://www.discordmods.com
  Reply With Quote
01-12-06, 09:54 PM   #13
Lozareth
An Onyxian Warder
 
Lozareth's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 366
DART does have a frame finder, it just doesn't goes as deep as DFM's. It's at the bottom of DART's options window.
__________________
High Pope of the Divine Chihuahua
http://www.discordmods.com
  Reply With Quote
01-14-06, 09:41 AM   #14
Stachel
A Murloc Raider
 
Stachel's Avatar
Join Date: Jan 2006
Posts: 5
Originally Posted by Lozareth
OnLoad:
this:RegisterEvent("PLAYER_TARGET_CHANGED")

OnEvent:
if UnitName("target") DART_Show(ti) else DART_Hide(ti) end



Fixed.

Thank you, but it didn't worked.

I get the following error:

Count: 1
Error: [string "function DART_Texture7_Script_OnEvent(param, ti)..."]:2: `then' expected near `DART_Show'
__________________
Allt Svartnar - Allein unter Menschen

Last edited by Stachel : 01-14-06 at 05:41 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Scripting Help DART/DUF


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