theblackpixel Posted January 8, 2021 Share Posted January 8, 2021 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 More sharing options...
RichWebster Posted January 8, 2021 Share Posted January 8, 2021 You could use the IsSwimming condition on an ability spell to detect when the player starts swimming. Then in a scripted magic effect you could loop and check for that image space mod, and do something when it's detected. Link to comment Share on other sites More sharing options...
theblackpixel Posted January 8, 2021 Author Share Posted January 8, 2021 I figured that out, however it's that check that I can't seem to get to work, and I cannot find any reference scripts to show me how to achieve this. Link to comment Share on other sites More sharing options...
RichWebster Posted January 8, 2021 Share Posted January 8, 2021 I see, I assumed you'd had that part sorted from your function examples. Might need another think. Link to comment Share on other sites More sharing options...
maxarturo Posted January 8, 2021 Share Posted January 8, 2021 (edited) 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". https://www.creationkit.com/index.php?title=Ability_condition_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 https://www.creationkit.com/index.php?title=RegisterForAnimationEvent_-_Form 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 January 8, 2021 by maxarturo Link to comment Share on other sites More sharing options...
theblackpixel Posted January 8, 2021 Author Share Posted January 8, 2021 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".https://www.creationkit.com/index.php?title=Ability_condition_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) nativehttps://www.creationkit.com/index.php?title=RegisterForAnimationEvent_-_FormThis 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 More sharing options...
dylbill Posted January 8, 2021 Share Posted January 8, 2021 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 underwaterbool Function IsActorUnderwater(Actor akActor) global native ;/ LIMBNone = -1Torso = 0Head = 1.../; Which looks like it would work, but is not the same on the LE function. Link to comment Share on other sites More sharing options...
maxarturo Posted January 9, 2021 Share Posted January 9, 2021 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 More sharing options...
theblackpixel Posted January 11, 2021 Author Share Posted January 11, 2021 Just checked, and unfortunately that function indeed only works on SSE, and I need to get it working on LE as well (it's what I use, and I don't think you can backport skse dll plugins). The search continues... Link to comment Share on other sites More sharing options...
Recommended Posts