Jump to content

[LE] Is it possible to use this function as a condition?


Recommended Posts

I want to use either ImageSpaceModifier GetImageSpaceMod() or SoundDescriptor GetDescriptor() to detect a specific IMod or Sound Descriptor, which if true, activates my MagicEffect.

 

Essentially what I am looking for is a way to tell the creation kit whether or not the PC is underwater.

 

Is this possible/if it is, how do I go about this, I can't seem to find any references for this?

 

If you have another way to achieve the same thing, by all means :)

 

 

Link to comment
Share on other sites

1) Conditions on an 'Ab Spell' added to the player will only work for a specific time, after that it will stop working altogether caused by the "Active effect time imprecision bug".



2) Not all water types use 'ImageSpace Modifiers', so in some waters your idea will not work.


3) One good approach is to make an "Ab Spell" with a "Magic Effect" with archetype "Script", and then use:

bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native


This way you will be monitoring the player's "Swimming" animation, plus you don't need to add conditions to your "Ab Spell".


I hope it helps.

Edited by maxarturo
Link to comment
Share on other sites

 

1) Conditions on an 'Ab Spell' added to the player will only work for a specific time, after that it will stop working altogether caused by the "Active effect time imprecision bug".
2) Not all water types use 'ImageSpace Modifiers', so in some waters your idea will not work.
3) One good approach is to make an "Ab Spell" with a "Magic Effect" with archetype "Script", and then use:
bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native
This way you will be monitoring the player's "Swimming" animation, plus you don't need to add conditions to your "Ab Spell".
I hope it helps.

 

Thank you for your reply. If not the imagespace one, the sound descriptor function could work in theory. Unfortunately the swimming animation makes no distinction between being underwater and just in the water. That is why I cannot just use IsSwimming. I suppose this is simply not possible.

Link to comment
Share on other sites

You can maybe use Papyrus Extender: https://www.nexusmods.com/skyrim/mods/95017 which has the function bool function IsActorInWater(Actor akActor) global native

In the SSE version it's

 

;Returns whether the actor is underwater
bool Function IsActorUnderwater(Actor akActor) global native
;/ LIMB
None = -1
Torso = 0
Head = 1
...
/;
Which looks like it would work, but is not the same on the LE function.
Link to comment
Share on other sites

It all depends on how and what you want to do.


dylbill suggestion with the "bool Function IsActorUnderwater(Actor akActor) global native" seems the right way to go.

* I personally have never used it so i don't know if it has any issues.


If any other alternative pops into my head i'll post it, but I doubt it... after a long hard work week my brain waves are literally FLAT....

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...