DICE PACKS BUNDLE
  1. #1

    EffectManager.setCustomOnEffectAddEnd callback isue

    I've noticed a issue (and I am not sure when it started) but the nodeTargetEffect returns nil for clients but works for host.

    Code:
    EffectManager.setCustomOnEffectAddEnd(adndOnEffectAddEnd);
    
    ...
    function adndOnEffectAddEnd(nodeTargetEffect, rNewEffect)
      Debug.chat("adndOnEffectAddEnd",nodeTargetEffect, rNewEffect)
    ...

    nodeTargetEffect returns nil if it's a client but not as host.

    Note the effect added I am looking for a callback is "EffectManager.addEffect("", "", ActorManager.getCTNode(rSource), { sName = sDisplacementTag, sLabel = sDisplacementTag, nDuration = 1, sUnits = "minute", nGMOnly = 1, }, false);" run by the character to apply an effect on the character by the player.

    I am pretty sure this used to work but I could be wrong... am I missing something?
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  2. #2
    The player client does not have ownership of any CT data; so it can not add data to the CT nodes directly. That's why the ActionEffect script routes effect actions to the host machine; and any direct applications only occur on the host. You'll have to route any effect adding requests to the host using EffectManager.notifyApply(rEffect, sTargetCT)

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    The player client does not have ownership of any CT data; so it can not add data to the CT nodes directly. That's why the ActionEffect script routes effect actions to the host machine; and any direct applications only occur on the host. You'll have to route any effect adding requests to the host using EffectManager.notifyApply(rEffect, sTargetCT)

    Regards,
    JPG
    That got it, thanks ! I didnt consider access to the CT node, was just thinking of the user being able to add an effect to themselves.
    Last edited by celestian; April 27th, 2023 at 19:29.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in