Category: Effects Since engine version: 4.9.5.0 CE
Description
Deletes an effect
Syntax
bool RemoveEffect
(string szEffectName, object pTarget, int iIndex, bool fDoNoCalls, int iNewTimer);
Parameters
szEffectName:
[opt]
Name of the effect without preceding 'Fx'. You can use '*' and '?' wildcards.
pTarget:
[opt]
Target object from which to remove an effect. If 0, the global effects list will be searched.
iIndex:
[opt]
Effect index. If using a wildcard search in szEffectName results in multiple matches, this index will indicate which effect from the list of results to use. If on the other hand no szEffectName is specified, this index will access the effect of the given effect number. As opposed to direct access via effect numbers, access by index will ensure that all indexed effects from 0 to the given number are reached.
fDoNoCalls:
[opt]
If not 0, no Stop calls will be made.
iNewTimer:
[opt]
New timer interval. If -1, the previous value will be kept. Otherwise, this call will also reset effect time.
Remark
See GetEffect for an example. Warning: if an effect is meant to delete itself using this function, only use pTarget and iIndex, not szEffectName!