EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-15-2006, 06:48 PM
Celestian Celestian is offline
A Crazed Gnoll
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 23
Default if then else and gamedata

Ok, say I wanted to check to see if a player was a Templar and if so make a page visible. Something like...

OnActivate="Visible=(GameData.Self.SubClass==Templar)"
or something like:
OnActivate="Visible=(Parent.Parent.Player.SubClass.Text==Templar)"

Now first, can you use GameData in this fashion or do I need to use the Parent.* vars, if so where are the "Self" player fields. I looked in the default ui and couldn't find them myself.

Can you use if, then, else statements? If so whats the proper format?

If there is a FAQ on such things please feel free to point me to them, thanks!

Last edited by Celestian : 06-15-2006 at 06:55 PM.
Reply With Quote
  #2  
Unread 06-15-2006, 07:05 PM
Dolby's Avatar
Dolby Dolby is offline
Bacon Eater
Premium Member
EQ2Interface Admin
This person is a EQ2Map developer.
 
Join Date: Feb 2004
Posts: 2,452
Default

this thread may give you some insight on how things work. Scroll down a few posts and that should be what you’re looking for I think.

Would love to see some interfaces use some of this logic.
Reply With Quote
  #3  
Unread 06-15-2006, 07:16 PM
Celestian Celestian is offline
A Crazed Gnoll
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 23
Default

Thanks for the link that definately cleared up some of the if then else questions I had. I followed the other thread as well and it does appear that GameData.* is not how you can compare values.

I am still kinda confused on that point but it seems I will use the Parent.* tree but unsure exactly how to find the "Self" values using it.

Again thanks!
Reply With Quote
  #4  
Unread 06-15-2006, 09:01 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Game Data is essentially a dynamic data link. A pipe that feeds data to other XML objects. Most of these DDs pass multiple attributes, so I doubt you'll be able to do comparisons on them directly.

The usual comparison method is to attach the desired DD to a standard XML object (like a text field) hidden off screen, then do your comparison against the LocalText of that object.
Reply With Quote
  #5  
Unread 06-16-2006, 02:14 PM
Celestian Celestian is offline
A Crazed Gnoll
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 23
Default

Ok did some further testing. I created a Text object (PlayerClassName) in Player xml and the dynamicdata for the text is /GameData.Self.SubClass

I then have a page called "TemplarPage" underthat page are several options and images that are specific to templars. What I have done is this on that page:

OnActivate="Visible=(PlayerClassName.LocalText=='Templar')"

However it always displays the information under the TemplarPage no matter what class I login with. Does making the page, with objects below it, not visible not also make items within that page hidden?
Reply With Quote
  #6  
Unread 06-16-2006, 05:05 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

You would need to link it to the OnShow event of that window, as OnActivate won't get triggered.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 03:49 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI