|
01-08-2011, 10:43 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Target quick button
Greetings,
Ok my target window has 4 quick buttons on it: invite, follow, mentor and friend. These buttons parse the targets name in the command so its invite target, ect.
Now my question is I would like to add a group chat text to say the autofollow button, so whne you press the auto-follow button, you auto-follow your target and it tells the group "I am auto-following George" (if George was your target)
I can get it to do this correctly, sometimes I get a 0 infront of the following, and the Parent.Target.Name.text is parsed as normal text.
Here is my AutoFollow button code:
Code:
<Button Location="23,0" Name="AutoFollow" OnPress="follow Parent.Parent.Parent.Target.v1.Name.text" PressSound="ui_pressed" RStyleActivated="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowPressedRect" RStyleDefault="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowNormalRect" RStyleMouseOver="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowMouseoverRect" ScrollExtent="20,20" Size="20,20" Tooltip="Auto-follow target" TooltipStyle="/TooltipStyles.TooltipTargetQuickButtons" />
Any help would be great.
Thanks,
Draven
|
01-10-2011, 10:37 AM
|
A Darkpaw Brute
|
|
Join Date: Jan 2005
Server: Storms
Posts: 44
|
|
Try this :
OnPress="follow Parent.Parent.Parent.Target.v1.Name.text
gsay I am auto-following Parent.Parent.Parent.Target.v1.Name.text"
don't forget to press "ENTER" before add the gsay line
gsay line must be on new line
__________________
Final Heroes of Pegasus on STORMS Server (Fr)
|
01-10-2011, 02:31 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
Thanks for the solution. I assume this is done in an xml program since hitting enter doesn't work in the ui builder? Is there another solution in the UI builder?
Thanks,
Draven
|
01-10-2011, 03:29 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Quote:
Originally Posted by Draven_Caine
Greetings,
Thanks for the solution. I assume this is done in an xml program since hitting enter doesn't work in the ui builder? Is there another solution in the UI builder?
Thanks,
Draven
|
Double click your "OnPress" property. You should be getting a popup window to edit from, which you can surely hit enter and go down a line within.
|
01-10-2011, 04:01 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
Oh awsome!! I thank both of you for the help. This part of my window is a request so I was trying to get it to work
Thanks,
Draven
|
01-10-2011, 04:10 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
That fix "kinda" worked. The problem now is here is my code for the OnPress:
Code:
follow Parent.Parent.Parent.Target.v1.Name.text
say I am auto-following Parent.Parent.Parent.Target.v1.Name.text
Its parsed to say for testing reasons, but what it parses is odd, Its does the follow command right, but it tell /say "I am 0 following George" (If George is your target.
It seems to take the auto- or auto (if i remove the dash) part of the code and replace it with 0 for some reason.
Any ideas?
Thanks,
Draven
Last edited by Draven_Caine : 01-10-2011 at 04:12 PM.
|
01-10-2011, 04:15 PM
|
Slayer of clock cycles
|
|
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
|
|
Quote:
Originally Posted by Draven_Caine
Greetings,
That fix "kinda" worked. The problem now is here is my code for the OnPress:
Code:
follow Parent.Parent.Parent.Target.v1.Name.text
say I am auto-following Parent.Parent.Parent.Target.v1.Name.text
Its parsed to say for testing reasons, but what it parses is odd, Its does the follow command right, but it tell /say "I am 0 following George" (If George is your target.
It seems to take the auto- part of the code and replace it with 0 for some reason.
Any ideas?
Thanks,
Draven
|
It is subtracting following from auto. Use the following code
Code:
OnPress="
follow Parent.Parent.Parent.Target.v1.Name.text
say 'I am auto-following ' Parent.Parent.Parent.Target.v1.Name.text"
|
01-10-2011, 04:21 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Quote:
Originally Posted by Landiin
It is subtracting following from auto. Use the following code
Code:
OnPress="
follow Parent.Parent.Parent.Target.v1.Name.text
say 'I am auto-following ' Parent.Parent.Parent.Target.v1.Name.text"
|
Greetings,
So single quotes are escape characters I take it than?
Thanks,
Draven
|
01-10-2011, 04:50 PM
|
Fetish Core author
|
|
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
|
|
Single quotes are string delimiters, just like double quotes can be. Since it's already inside of a double quote, you have to use a single quote to indicate that "I am auto-following" is a string.
__________________
|
01-10-2011, 05:01 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
You can use either within UIBuilder, as it will get saved as ' or " allowing it to parse correctly.
|
01-10-2011, 05:07 PM
|
|
A Griffon
|
|
Join Date: Oct 2009
Server: Unrest
Posts: 155
|
|
Greetings,
Thanks everyone for being so helpful. I got 3 of 4 of the buttons working but the 4th button is just a quick invite so no text is needed.
Another window down!!
Thanks,
Draven
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:44 AM.
|
|