Skyrim Special Edition

This mod provides a few functions and events to catch with papyrus script.

Functions

- UseSSAdapter():

Importer of scripts of this mod.

syntax:
UseSSAdapter()

samples:

To import scripts of this mod

Spoiler:  
Show

SSAdapter SSA_Util;
SSA_Util = SSAdapter.UseSSAdapter();



- StartSceneWrapper():

Call a scene of user selected framework, or fade in/out with messagebox.

syntax:
StartSceneWrapper(Actor starter = none, Actor target = none, String type = "", Bool isAggressive = false, String messageText = "",
Actor[] actors = none, Bool useFadeInOut = true,  Bool useFurniture =
true, String strArg = "", Float numArg = 0.0)

arguments:
Spoiler:  
Show

Actor starter: default none
  Main actor, supposed to be player character basically. Without this, function will automatically pick playerRef.

Actor target: default none
  sub actor, in many cases they are NPC.

String type: default ""
  Scene type to specify the starting scene. If type is "kissing," starting scene without undressing & sexual intercourse. Without this argument, scene will be randomly chosen.

Bool isAggressive: default false
  As it says.

String messageText: default ""
  This text will be displayed in message box in case there are no framework is set or installed.

Actor[] actors:
  To pass Actors into the scene, especially when over 3 actors
  involved this is required. currently accepting 5 actors maximum.
  In many case, actors[0] should be player, [1] should be main target.

Below are not implemented yet.

Bool useFadeInOut
Bool useFurniture
String strArg
Float numArg



samples:

To call 1 on 1 blowjob scene from topicinfo dialogue fragment.
Spoiler:  
Show

ScriptName YourGreatScriptNameHere Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
SSA_Util = SSAdapter.UseSSAdapter();

;BEGIN CODE
SSA_Util.StartSceneWrapper(target = akSpeaker, type = "blowjob");
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

SSAdapter SSA_Util;




To call 3 actors scene
Spoiler:  
Show

Actor[] sceneActors = new Actor[3];
sceneActors[0] = playerRef;
sceneActors[1] = akSpeaker;
sceneActors[2] = thethird;
SSA_Util.StartSceneWrapper(actors = sceneActors);




Events


3 custom events are implemented and can be catch with RegisterForModEvent() in other scripts.

- OnSceneStartUnified:
Sent with all 3 frameworks, not only via this mod's StartSceneWrapper() but all scenes including player character. Not sent by NPC only scenes of Flower Girls.

- OnSceneOrgasmUnified:
Only tested with OStim, and actor's form id can be catched as numArg of RegisterForModEvent().
I'm not familiar with how the SL deal with orgasm though, will look into it.
Flower Girls has no event about orgasm itself, so should we treat the end of scene as alternative? I'm not sure.

- OnSceneEndUnified
:
Sent with all 3 frameworks, not only via this mod's StartSceneWrapper() but all scenes including player character.

Event Related Function

- IsSceneRunning()

You can get if any of scenes called by StartSceneWrapper() running or not with this function.
This only works with the scene called via this mod, not working with the scene started by other mods.
As of v1.2.0, this catches the scenes of all 3 frameworks, not only started via this mod but also other mods.

As the sample, Shadowmans' Elisif patch in option files using this event to teleport actors after the scene.
Sample code to use it in dialogue topic script fragment.
Spoiler:  
Show

; Start scene
SSA_Util.StartSceneWrapper(target = akSpeaker);

; Use isSceneRunning() to get the end.
; Scene start takes some seconds...
Utility.Wait(8.0)
While SSA_Util.isSceneRunning()
    Utility.wait(1.0);
EndWhile

; Do something here after the scene.
 

Article information

Added on

Edited on

Written by

DevInTheDetails