EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 01-01-2005, 12:56 PM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Question Anyone know about Event Properties: OnActivate, OnDisable, ...?

Since the guide is almost moot on the subject I was just wondering if anyone has any information on how to work with these. Specifically how to get them to control another object. Say my tree looks like this:


Tier1
+Tier2
++Tier3


I have figured out that I can go into Tier3 and put in on the OnActivate [opacity=0] and it will change the Tier3 opacity. Well I want to say, put in the OnActivate for Tier3, I want it to change the opacity of Tier1, or 2, any ideas on this? I've tried a few different ways with no luck at all. Thanks in advance.

RECAP: What we have figured out up until post #28
"/" commands work.
ie: Onpress: /dance (will make you dance)

"/" commands that require parameters need special formatting.
OnPress="say='this is a test' say='this is a test'"

You can control other objects from another.
ie:
root
+mainhud
++Map
+++Somemapelement
.
working with somemap_element and putting in
OnPress: Parent.Size="2,2" (will make Map size 2,2)
OnPress: Parent.Parent.Opacity="0" (will make mainhud invisible)
OnPress: Parent.Parent.Player.Healthbar.Opacity="0" (will make healthbar in Player invisible)

You cannot Parent.Parent... up to the root level
ie: In mainhud.player you cannot use Parent.Parent.Inventory.Market.Blah

Update with discovery by Zonx:
Instead simply ignore the module level. Parent.Market.Blah



You can use math commands.
You can't do math on things with multiple values (Size, for instance)
Math works on text objects (though it makes it show 3 decimal places whether you like it or not; 6+1=7.000)
If you're using math, you need to make sure you're using the full reference.
ie:
OnPress="parent.BLARG.opacity=(parent.BLARG.opacity-0.05)" works.
OnPress="parent.BLARG.opacity=(opacity-0.05)" checks the opacity of the button you're pressing, not BLARG.

You can't change the Opacity values of windows with eq2usescomwndcontrols="true", the Window Settings opacity value will instantly go back into effect.
You can use Visible to show/hide the frame/titlebar/backdrop, though.

You can use ! to reverse Boolean values... OnPress="parent.Test.visible=(!parent.Test.visible)" works great.

How to do IF statements.
OnPress="Param=((parent.Test.visible)==(true))" Sets Param to the true/false value of the statement. ==, >, and < operations are supported. !=, <=, and >= are not, but you can get around them using ! on the statement.

Various changes to bring up to date. -Deathbane

Last edited by Deathbane27 : 04-12-2005 at 09:05 AM.
Reply With Quote
  #2  
Unread 01-02-2005, 04:40 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

We were discussing this here:
http://www.eq2interface.com/forums/showthread.php?t=806

But all we could get it to do was post single-word slash commands like /toggleshowadventurexp and /showinventory...

So THAT is why = had such an interesting property...

Working with this now, I'll let you know what I find.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 05:56 AM.
Reply With Quote
  #3  
Unread 01-02-2005, 06:05 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

You can do math!

Code:
<Button Name="WEE" Opacity="0.750" OnPress="opacity=(1-opacity)" Size="100,40" Style="/ButtonStyles.text_button_default">WEE</Button>
Makes a button that switches between 75% and 25% opacity every time you click it.

Still working on referencing other UI elements. (My test window has 6 buttons so I can do 6 tests per UI reload, might want to do something similar.)

Please use this thread to discuss UI element scripts. Use the other thread for attempts to get multi-word slash commands working.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #4  
Unread 01-02-2005, 06:15 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

If you're using this to change Text/LocalTooltip attributes, you can use single quotes to put in spaces. This still doesn't help execute slash commands, though. (Tried OnPress="OnPress='/mood happy'". Clicked it second time and it did /mood then /happy, as usual.)
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #5  
Unread 01-02-2005, 06:26 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

(Buttons are in Player window. Buttons "WEE" through "WEE4" try to control button "BLARG".)

Following doesn't work: (OnPress="" implied)


BLARG.Opacity=0
/BLARG.Opacity=0
.BLARG.Opacity=0
\BLARG.Opacity=0
MainHUD.Player.BLARG.Opacity=0
root.MainHUD.Player.BLARG.Opacity=0
/MainHUD.Player.BLARG.Opacity=0
/root.MainHUD.Player.BLARG.Opacity=0
\MainHUD.Player.BLARG.Opacity=0
../BLARG
../
..

Replacing the period between BLARG and Opacity with any of the following characters also does not work:
: -


+ kills everything before it and makes it refer to itself, unless you start with /


If at first you don't succeed... blame Microsoft!



You can change multiple attributes at once. OnPress="opacity=0.75 size=200,50 text='Clicky time!' dance" does successfully change the opacity, size, and text, and make your character dance.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 06:59 AM.
Reply With Quote
  #6  
Unread 01-02-2005, 06:56 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

I myself tried many of those, but didn't document which ones as I was just in a mad frustration of throwing weird things in. This would be such a useful property if we can just figure out how to use it, that is if it is possible to do this with it. Thanks for trying and I'll keep you up to date with any discoveries.

--edit--
I do remember I tried
eq2ui.MainHUD.Player.BLARG.Opacity=0
eq2ui.xml.MainHUD.Player.BLARG.Opacity=0
Reply With Quote
  #7  
Unread 04-03-2005, 07:13 AM
Sixes Sixes is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Blackburrow
Posts: 26
Default

Quote:
Originally Posted by Eloa
OnPress="parent.BLARG.opacity=(parent.BLARG.opacity-0.05)" works.
Does anyone know if it's possible to get a second level of indirection? For example:
<Text Name="Foo">BLARG</Text>
...
OnPress="parent.Blarg.opacity=(parent.(parent.Foo.Text).opacity-0.05)"

I've not been able to make this work but I may be missing something. At least I hope I am.

Sixes
Reply With Quote
  #8  
Unread 04-03-2005, 02:05 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

So far noone has gotten any form of concatination or nested variables working. This includes paths with variable segments.

In all tests I've run, it either reads the entire thing as a string with no variable interpritation at all, or it reads the first portion as a variable clipped where the second variable begins.
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 10:42 AM.


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