antstubell Posted September 1, 2020 Share Posted September 1, 2020 I tried script below as shown in wiki EVENT onTriggerEnter(ObjectReference akActionRef)if Game.GetPlayer().IsSwimming()Debug.notification("The player is enjoying a swim.")EndIfEndEvent Error = IsSwimming is not a function or does not exist Ideas for alternative please? Link to comment Share on other sites More sharing options...
TyburnKetch Posted September 1, 2020 Share Posted September 1, 2020 As it is a condition I think it should be something more like: If Game.GetPlayer().IsSwimming == 1 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 1, 2020 Share Posted September 1, 2020 I have this in working code:If Dude.IsSwimming()Note that Dude is an actor parameter in a custom function.Perhaps you need to cast down from ObjectReference (which is what GetPlayer() returns) into Actor. Taking your script example EVENT onTriggerEnter(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() if (akActionRef as Actor).IsSwimming() Debug.notification("The player is enjoying a swim.") EndIf EndIf EndEvent Link to comment Share on other sites More sharing options...
antstubell Posted September 1, 2020 Author Share Posted September 1, 2020 Thanks, will give it a go tomorrow. Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2020 Author Share Posted September 2, 2020 (edited) No joy. I get the same error. TyburnKetch's idea - EVENT onTriggerEnter(ObjectReference akActionRef)if Game.GetPlayer().IsSwimming == 1Debug.notification("The player is enjoying a swim.")EndIfEndEvent Gives these errors - IsSwimming is not a property on script actor or one of its parentscannot compare a none to a int (cast missing or types unrelated) Edited September 2, 2020 by antstubell Link to comment Share on other sites More sharing options...
TyburnKetch Posted September 2, 2020 Share Posted September 2, 2020 Hmmm. Sorry it did not help. Have you tried the suggestion from Ishara? Waaay more knowledgable than me :) Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2020 Author Share Posted September 2, 2020 Yes, Ishara's script gives the same error I original stated. Thanks for the input. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 2, 2020 Share Posted September 2, 2020 IsSwimming is added to the Actor script by SKSE. Make sure you have all the SKSE source scripts in a location that the utility you are compiling with can locate. Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2020 Author Share Posted September 2, 2020 SKSE has never worked for me. I did a post on it earlier this year or last year and despite you good people here on Nexus helping me and saying that everything looked fine - it never worked for me. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 2, 2020 Share Posted September 2, 2020 Then your only recourse is to fall back onto animation events. This is taken out of my Controller Walk Run Toggle for SSE. It catches when the player starts swimming. Bare bones code only ;inside a maintenance function called during OnInit and triggered by OnPlayerLoadGame event RegisterForAnimationEvent(PlayerRef,"SoundPlay.FSTSwimSwim") ;the event itself Event OnAnimationEvent(ObjectReference akSource, string asEventName) If (akSource == PlayerRef) If asEventName == "SoundPlay.FSTSwimSwim" ;do something EndIF EndIf EndEvent But I rely on IsSwimming to find out when the player stops swimming. You might be able to use a walking animation to find out when the player stops swimming. Link to comment Share on other sites More sharing options...
Recommended Posts