View Single Post
  #15  
Unread 08-01-2012, 06:49 PM
Kunter Kunter is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Jun 2012
Posts: 7
Quote:
Originally Posted by Snoopy81
There is 2 ways to catch an effect on the player...

- 1st one as above is to scan "EffectList = LocalPlayer:GetEffects();" at regular intervals (ie: onTimer or on Refresh )

- 2nd, I'd say a cleaner way is to catch events AddCallback(EffectList, "EffectAdded", MyEffectChangedCallback); and "EffectRemoved"
http://www.lotrointerface.com/downlo...ffectWarn.html

I used this:

EffectList = Turbine.Gameplay.LocalPlayer:GetInstance():GetEffe cts();

and this

AddCallback(EffectList,"EffectAdded", --function to handle event--);

So pretty much the same. EffectWarn works very fast and by the time 5 evenings at Saruman show that it is reliable (anyhow for me).
Reply With Quote