EC - Double clicking the Target Window to attack often does not work

looploop Posts: 327
1. Target a monster to reveal the Target Window
2. Double click the Target Window while in war mode
3. Observe you do not attack it

I suspect it's related to the below error that shows when you target the monster.


Comments

  • Arnold7Arnold7 Posts: 1,334
    Not sure what you are referring to but targeting in general does not work when things get busy.  Gets frustrating to see the targeting circle cycle thru everything in in the area that’s out of range while the snake six spaces away is trying to kill you.  Might consider clicking-on the monster with the mouse instead.  I play mostly a mage and use spells now, like chain lightening, that operate independently of the targeting circle.  Note targeting works fine if it’s just me and a couple monsters, but when the current spawn starts I am lucky if it targets anything within range assuming it does target something.

  • TimStTimSt Posts: 1,815
    edited December 2023
    It looks like the code
    function TargetWindow.UpdateName(targetId)	

    if(targetId ~= nil and targetId == WindowData.CurrentTarget.TargetId ) then
    LabelSetText("TargetWindowName", WindowData.MobileName[WindowData.CurrentTarget.TargetId].MobName)

    should be

    function TargetWindow.UpdateName(targetId)	

    if(targetId ~= nil and targetId == WindowData.CurrentTarget.TargetId
    and WindowData.MobileName[WindowData.CurrentTarget.TargetId] ~= nil) then
    LabelSetText("TargetWindowName", WindowData.MobileName[WindowData.CurrentTarget.TargetId].MobName)

  • CovfefeCovfefe Posts: 239
    edited December 2023
    Let me understand correctly. For people who like to play without bugs.

    it’s encouraged for us to write our own code/install other peoples code for bug fixes for 3d and post here.

    but if someone writes their own code in opensource JavaScript for bug fixes for 2d then you can’t talk about it?
  • MariahMariah Posts: 3,021Moderator
    EC was designed to allow user created UI's, SOME files are editable, within limits.CC's files are not.
  • looploop Posts: 327
    edited December 2023


    TimSt said:
    It looks like the code
    function TargetWindow.UpdateName(targetId)	

    if(targetId ~= nil and targetId == WindowData.CurrentTarget.TargetId ) then
    LabelSetText("TargetWindowName", WindowData.MobileName[WindowData.CurrentTarget.TargetId].MobName)

    should be

    function TargetWindow.UpdateName(targetId)	

    if(targetId ~= nil and targetId == WindowData.CurrentTarget.TargetId
    and WindowData.MobileName[WindowData.CurrentTarget.TargetId] ~= nil) then
    LabelSetText("TargetWindowName", WindowData.MobileName[WindowData.CurrentTarget.TargetId].MobName)


    That would probably just mask the nil pointer but does point to some underlying problem where the TargetWindow and its data source are out of whack. Something is probably wrong with this stored TargetId, which leads to the nil pointer elsewhere:

    function TargetWindow.OnItemDblClicked()
        if IsMobile(TargetWindow.TargetId) then
            local mobileId = TargetWindow.TargetId
            if  IsBanker( mobileId ) then
                ContextMenu.RequestContextAction(mobileId, ContextMenu.DefaultValues.OpenBankbox)
            elseif IsVendor( mobileId ) then
                ContextMenu.RequestContextAction(mobileId, ContextMenu.DefaultValues.VendorBuy)
            elseif IsOldQuestGiver( mobileId ) then
                ContextMenu.RequestContextAction(mobileId, ContextMenu.DefaultValues.NPCTalk)
            else
                UserActionUseItem(mobileId,false)
            end
        else
            UserActionUseItem(TargetWindow.TargetId,false)
        end
    end
    Would be better not to store and fetch it from WindowData.CurrentTarget.TargetId always, or reference the Id of the active window, presuming the Id of the window is set to the TargetId on initialization.
  • looploop Posts: 327
    Arnold7 said:
    Not sure what you are referring to but targeting in general does not work when things get busy.  Gets frustrating to see the targeting circle cycle thru everything in in the area that’s out of range while the snake six spaces away is trying to kill you.  Might consider clicking-on the monster with the mouse instead.  I play mostly a mage and use spells now, like chain lightening, that operate independently of the targeting circle.  Note targeting works fine if it’s just me and a couple monsters, but when the current spawn starts I am lucky if it targets anything within range assuming it does target something.


    Heh, I do the same with my mage and stick to Wither for the same reason. I've posted a topic here about targeting cycling through distant monsters separately at one point, but it's probably all related. I think it got worse around the first attempt to fix the EC "ghost mob" issue several months or a year ago. Unfortunately, double clicking the monster can often cause you to attack your guildmates if you're not careful.
Sign In or Register to comment.