1. Hi,

    I'm trying, unsuccessfully, to get an action button to respond to left and right mouse button clicks. I've downloaded the SABTest example from chapter 17 as a starting point but I'm unable to get the button to respond to right-clicks. My aim is to get the button to cast "Remove Curse" when left-clicked and "Cure Poison" when right-clicked. I've tried the following:

    SABTest:SetAttribute("spell1", "Remove Curse")

    SABTest:SetAttribute("spell2", "Cure Poison")

    It works fine when I left-click but nothing happens when I right-click the button.

    Thanks.

  2. Hi,

    I'm trying, unsuccessfully, to get an action button to respond to left and right mouse button clicks. I've downloaded the SABTest example from chapter 17 as a starting point but I'm unable to get the button to respond to right-clicks. My aim is to get the button to cast "Remove Curse" when left-clicked and "Cure Poison" when right-clicked. I've tried the following:

    SABTest:SetAttribute("spell1", "Remove Curse")

    SABTest:SetAttribute("spell2", "Cure Poison")

    It works fine when I left-click but nothing happens when I right-click the button.

    Thanks.

    Did you register the button for right click?  i.e.

    SABTest:RegisterForClicks("LeftButton", "RightButton")

     

  3. Ahh, that explains it. I didn't register the button. It works fine now.

    Thanks for your reply.