EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Help with OnPress (https://www.eq2interface.com/forums/showthread.php?t=8447)

Vexen 05-23-2007 11:42 AM

Help with OnPress
 
I have a button that you click to cure/cast etc etc.

I am trying to get it to say something in chat (ie guild chat or say or whatever) and cant get the "onpress" function (I think it is) to work properly.

Question #1:
What is the proper formatting for this function?

Question #2:
Is there a way to have a variable that is easily edited for the users of the UI to change what is said in the chat?

Any help would be appreciated. Thanks.

gm9 05-23-2007 12:01 PM

The commands you put into UI elements work mostly like you would type them into the chat window in game, except that you do not need the "/". So
OnPress="say Hello World!"
should work. Another format is this:

Code:

OnPress="say=('Hello World!') say=('Hello World!')"

The code above is always how it looks in the XML of course.

Your question #2 has many answers, most of all depending on wether you want the user to change the function in game or out of game. The easiest out-of-game solution is to tell the user how to edit your xml of course. Or you can make a separate file with only the text you want to say, <include> it into the window and reference it via the OnPress function. Best look through some existing UIs to see how it works (all .txt files in ProfitUI are <includes> for example).

Vexen 05-23-2007 02:10 PM

Thanks for the help.. I will try this tonight. :)

Vexen 05-26-2007 06:51 PM

Problem..

Code:

OnPress="say=(&apos;Hello World!&apos;) say=(&apos;Hello World!&apos;)"
This says it twice for me? Any way to make it only say it once?


All times are GMT -5. The time now is 01:44 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI