![]() |
button to gsay and cast
I've been tweaking some existing mods to cast heals (not cures) on players in the group window. I can get most of the spells to fire off, but the one with a chat command is giving me grief. Does anybody see what my problem is? Am I even trying to approach this in the right way?
Code:
OnPress="target_none target_group_member 1 gsay=I'm stunned while I focus on healing %T. useability Focused Benefaction"Scyllel |
Commands in a single line will be triggered from right to left.
Try something like this: OnPress="target_none target_group_member 1 gsay I'm stunned while I focus on healing %T. useability Focused Benefaction" Would you want to use a /target_previous command at the end there? You can see how I made cure buttons in a persona window here: http://www.eq2interface.com/forums/s...7530#post57530 |
Thanks for your help Othesus. I actually used one of your mods for parts of my project. I get no love with the chat command though. If I include the line with the gsay command, nothing happens. Not even if I put the spell first. Sometimes it even takes two or three clicks to get the button to target. But if I omit the gsay line, then Bang, targeting works and the spell fires.
Do you know of any mods that are successfully using chat commands coupled with a useability command so I could peek at one that works. I'm really drawing a blank on this, and I don't have enough of my own experience to know what syntax works and what is doomed to fail. I'm curious, if I use a /target previous in there, won't it revert back to none because of the /target none statement that starts it off? Of course I'm not sure the /target none is necessary, but everybody seemed to be using it. Thanks Scyllel |
If you want, just attach your xml file here and I'll look at it.
After a bit more testing I think your gsay command has to look like this: gsay "I'm stunned while I focus on healing" Parent.Name.Text |
Yep, you need to put quotes around your gsay line.
The reason is that ' can act as a string delimiter -- in other words, its saying that starting there, everything is a string and since theres no closing version, the other lines are treated as strings and so not executed. Adding those two " should solve your problems. |
1 Attachment(s)
Thanks you guys. Now I've gotten it to say the first part properly, but I'm out of my league again when it comes to all the parent.name.text stuff.
any way, now it says: I'm stunned while I heal parent.name.text then it casts the spell. I've tried: gsay "I'm stunned while I focus on healing parent.name.text " gsay "I'm stunned while I focus on healing" parent.name.text gsay "I'm stunned while I focus on healing %T" No love on any. I guess I'll have to look up some mods that have speech in them to get a better idea how to do that. Thanks for your kind help while I try to learn this from the middle outward. I'll try again when I get back from my trip this week. I've decided to take you up on your offer to look at the file Othesus. I think you might recognize some of it (since you wrote one of my sources for this little Frankenproject...) |
Ok, I looked at your xml file and I see where you have the buttons. The "parent" part of Parent.Name.Text makes the UI engine move back one level of the UI tree. You'll have to use more parents to get back up to the level that the Name object is.
From your xml file I think it needs to be: <Button LocalTooltip="Focused Benefaction" Name="FocusedHealingButton" OnPress="target_none target_group_member 0 gsay "I'm stunned while I focus on healing" Parent.Parent.Parent.Name.Text useability Focused Benefaction" Opacity="0.000" ScrollExtent="18,18" Size="18,18"></Button> |
Thanks. I just got back from a trip and tested this. That was the ticket. Now that I understand the nested reference it seems such a trivial mistake. I was referencing the parent object which in the previous case was the button, but I needed to reference the target window which was up to more levels. Anyway, that one is working now. Thanks again.
|
| All times are GMT -5. The time now is 04:18 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI