Full Version : XmlUse and breaking bottles
xmlspawner >>Q&A >>XmlUse and breaking bottles
<< Prev | Next >>
Hale- 09-24-2007
So Steelcap and I were talking about XmlUse and the new targeting feature last night and I had the idea of putting an XmlUse attachment onto a bottle of alcohol that would create a target that would cause the player to break the bottle over another's head if the player clicked on another player. If the player clicks on themself, they simply drink it.
The problem we ran into was that the bottle already has its targeting function which we cannot seem to override with our own function. So rather than adding new double-click functionality we're trying to change the existing function.
I'm pretty sure I got that right.
Ideas anyone?
ArteGordon- 09-24-2007
Did you try disabling the default use function on the bottle by setting the BlockDefaultUse property on the attachment to true?
from xmlspawner2.txt

QUOTE
BlockDefaultUse Setting this property to true will allow you to completely disable the default scripted RunUO method called when the object is used. This can be used to replace existing default use functions with your custom use actions.

Hale- 09-26-2007
I thought about it but that would disable the desired effect of consuming the alcohol if the target is the player with the bottle.
Targets Self = drinks alcohol
Targets Other = breaks bottle
I need the original functionality as well as the added function.
ArteGordon- 09-27-2007
the problem is that it has to decide whether to use the custom use function or the default one before it brings up the target, so there is no way to switch it based on target selection.