Tag an AOE Effect and AOE sizes.
NeverwinterWights
Member Posts: 339
So I attempted to use the TagEffect function to change the tag of a custom EffectAreaOfEffect but it doesn't seem to work. I assumed since it is categorized as an effect that it would still apply to EffectAreaOfEffect. I know that once applied to a location it becomes an object.
So my question is, how do I change the tag of the created EffectAreaOfEffect or set/get it as a local object or even "get it" as a very specific object?
If there is not currently a way can we either have TagEffect work on AOEs or get another parameter in the EffectAreaOfEffect function to set a new tag?
Also do different AOE ids have different sizes? Currently using AOE_PER_CUSTOM_AOE but it is a little too big for what I need it for.
So my question is, how do I change the tag of the created EffectAreaOfEffect or set/get it as a local object or even "get it" as a very specific object?
If there is not currently a way can we either have TagEffect work on AOEs or get another parameter in the EffectAreaOfEffect function to set a new tag?
Also do different AOE ids have different sizes? Currently using AOE_PER_CUSTOM_AOE but it is a little too big for what I need it for.
0
Comments
you can find this object and change its tag, you can find example of this in community patch 70_inc_spells function spellsSetupNewAOE
Basically you have to get the object and set it yourself I think, that's how I did it. TagEffect is only used when you're looping through effects with GetFirst/NextEffect functions, for example the effects applied by the heartbeat or enter events. Using vfx_persistent.2da allows you to set different sizes and visuals. To implement widen spell you can simply set a vfx in vfx_persistent.2da with twice the radius.
Well there is the new "TagEffect" function which allows you to give a tag to the effect as soon as you create it. Unfortunately it just doesn't work for EffectAreaOfEffect. What I did end up doing is a GetObjectByTag using the default tag and then SetTag, in the same script, immediately after I create the effect which does work. However since this is in a pseudo HB I'm not sure if there is a possibility that the script may occasionally grab someone else's AOE object.
Edit: Now thinking about it I suppose I could just use a GetNearestObjectByTag to be safe?
You could use any way of grabbing the object, if you're changing all AOE object tags then a standard tag means it hasn't been set yet. The issue with safety is what to do when multiple objects are created at once.
Using AssignCommand changes the caller of the function you give to the object you assign it to. This means within that assigned function you can use GetAreaOfEffectCreator to get the caster. That allows you to confirm the correct object and set caster dependent tags.
Was looking for a way to put something down at a player location that has an OnExit script and it would only apply to the owner of the AOE object or effect and not someone running through it. Might be useful for many different things.