#Cannot receive certain effects via item after applying them by code

1 messages · Page 1 of 1 (latest)

wraith trail
#

For some effects like Scp1344, Poisoned, or Invisibility, I noticed that after enabling the effect via code (e.g. Player.EnableEffect<Scp1344>(1, 5);), the player can no longer receive the same effect again through the usual in-game item (e.g. by using the SCP1344 item).
However, the Scp207 effect does not have this issue—players can still obtain the effect again through the item even after adding it via code.
Is this an intentional game design, or a bug in the implementation? How can I avoid this, so that players can obtain the effect through the item again after the timed effect added by code expires?

sage glacier
#

That would more likely be a plugin prevention or a bug

wraith trail
sage glacier
#

And any plugin active

wraith trail
#

no any plugin, no exiled, yes

unborn canopy
#

Scp1344Item checks if the effect is enabled if so then deny the usage

When you use the item it just set Enabled = true

#

And since you already have the effect active it wont do anything

sage glacier
#

Also it's should modify duration no ?

unborn canopy
#

When 5 sec ends it should be able to apply again if the disable effect, Intensity change runs

wraith trail
#

when the 5 seconds effect given by the admin panel ends, the player has no effect (but now duration = 5, intensity=0, timeLeft=0), if the duration is set to 0 by plugin, then the 1344item will be able to give the effect normally, otherwise the item cannot provide any effect

unborn canopy
#

Ie: like 1 frame for the server and more frames from client since need to receive update

#

:(

wraith trail
#

💀

#

I set ev.Duration=0 when ev.Intensity==0 on PlayerUpdatingEffect event, and it seems to be working ideal state...?

unborn canopy
#

If works i pr to basegame to make it work without need of that

wraith trail
unborn canopy
#

Yes

#

Pref with the RA and plugin example