Jump to content
IGNORED

How stop auto advance stage for NPC?


Recommended Posts

hi,

 

I'm trying to make an orgy scene, but it bound to fail because its auto advance, SL setting auto advance stage only works for player. I want npc to loop selected scene until i end it manually, something like 'Controlled Animation' feature if you press N on npc that having sex, i knew there is a mod called H Tools, its good but it cant stop auto advance stage, is there any work around? thanks for the help.

Link to comment

You can't, not without changing sslThreadController.psc and recompiling this script.

You also can't stop animation enforced timed stages, even for players.

 

If you want to change how it behaves, look for event OnUpdate() on state Animating.

		; Advance stage on timer
		if (AutoAdvance || TimedStage) && StageTimer < RealTime[0]
			GoToStage((Stage + 1))
			return
		endIf

EDIT:

 

You can do this for AutoAdvance:

Event OnInit()
    RegisterForModEvent("HookStageStart", "SLStageStart")
EndEvent

Event OnPlayerLoadGame()
    RegisterForModEvent("HookStageStart", "SLStageStart")
EndEvent

Event SLStageStart(int tid, bool hasPlayer)
    if (hasPlayer)
        return
    endif

    sslThreadController slScene = SexLab.GetController(tid)

    if (slScene != None)
        slScene.AutoAdvance = false
        slScene.UpdateTimer(999999.0)
    endif
EndEvent

This will keep you from editing core SexLab scripts.

AutoAdvance will reset everytime sslActorAlias.LockActor() is called, but only if the player is in the scene.

 

EDIT2: StageTimer hack added.

Link to comment
4 hours ago, Hawk9969 said:

You can't, not without changing sslThreadController.psc and recompiling this script.

You also can't stop animation enforced timed stages, even for players.

 

If you want to change how it behaves, look for event OnUpdate() on state Animating.


		; Advance stage on timer
		if (AutoAdvance || TimedStage) && StageTimer < RealTime[0]
			GoToStage((Stage + 1))
			return
		endIf

EDIT:

 

You can do this for AutoAdvance:


Event OnInit()
    RegisterForModEvent("HookStageStart", "SLStageStart")
EndEvent

Event OnPlayerLoadGame()
    RegisterForModEvent("HookStageStart", "SLStageStart")
EndEvent

Event SLStageStart(int tid, bool hasPlayer)
    if (hasPlayer)
        return
    endif

    sslThreadController slScene = SexLab.GetController(tid)

    if (slScene != None)
        slScene.AutoAdvance = false
        slScene.UpdateTimer(999999.0)
    endif
EndEvent

This will keep you from editing core SexLab scripts.

AutoAdvance will reset everytime sslActorAlias.LockActor() is called, but only if the player is in the scene.

 

EDIT2: StageTimer hack added.

 

Hey, thanks for replying, thats what im thinking too about the time hack, unfortunately i cant possibly compile it, idk its always failed on my end. If its not too much to ask, can you compile it for me the file containing time hack, if you cant that's fine too, i'll try to make compile works first on my end, really appreciate it for the help.

Link to comment

This is just a sample code to show you how to disable auto advance; You will need to add extra code to make it switch stages/animations.

You will also need to create a new plugin and a new Quest entry within the plugin to attach this script to; The Quest entry also requires you to link a ReferenceAlias script as to receive the OnPlayerLoadGame event (RegisterForModEvent needs to be performed everytime you load a savegame).

Link to comment
18 hours ago, Hawk9969 said:

This is just a sample code to show you how to disable auto advance; You will need to add extra code to make it switch stages/animations.

You will also need to create a new plugin and a new Quest entry within the plugin to attach this script to; The Quest entry also requires you to link a ReferenceAlias script as to receive the OnPlayerLoadGame event (RegisterForModEvent needs to be performed everytime you load a savegame).

errr.. seems like many things to do.. what if i just use H Tools plugin for advance/switch animation, so i just need to disable auto advance with time hack right?

Link to comment

You still need to do what I said before about creating a plugin, otherwise the script will never be executed as no form attached it.

 

To just disable AutoAdvance and StageTimer you need to:

  1. Compile the script above, including a SexLab property in it.
  2. Compile a wrapper ReferenceAlias script as to be able to receive the OnPlayerLoadGame event.
  3. Create a new dummy quest within a new plugin, and attach the above scripts to it.

Here, I'll provide you with the scripts.

 

Now you just need to create the Quest entry, here is the plugin I'd made for my SexLab integration with IFPV.

Literally all you've to do is open it up with TES5Edit, change the editor id, change the quest name, change the scripts names and save.

 

P.S. No idea what HTools is. The only mod by that name that I am aware of is the one that includes equipable tongues and equipable pose feet.

scripts.7z IFPV - SexLab.esp

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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