PDA

View Full Version : EffectManager.setCustomOnEffectAddEnd callback isue



celestian
April 27th, 2023, 06:01
I've noticed a issue (and I am not sure when it started) but the nodeTargetEffect returns nil for clients but works for host.




EffectManager.setCustomOnEffectAddEnd(adndOnEffect AddEnd);

...
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?

Moon Wizard
April 27th, 2023, 17:06
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

celestian
April 27th, 2023, 19:26
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.