View Single Post
  #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