Jump to content

Npc Sex - Complete scripting noob


Recommended Posts

Posted

Hello All,

 

I am trying to crate a personal mod that adds sexual encounters between prominent npcs and various "servants" (courtesans, adultresses, etc.,) and I have absolutely no idea what I am doing. I know very little about scripting and have little free time to learn. What I am basically looking to do right now is to make a simple script that initiates sex between two npcs at a certain time of day. I believe I have the basic script down from following Ashal's example, but I am unsure how to fire it. Here is the script (almost completely copied from Ashal's example): 

 

Scriptname TestSex extends Quest  
{I is noob}
 
SexLabFramework property SexLab auto
 
function TestSex()
 
    ; // Create our actor array using our chosen actor references
    actor[] sexActors = new actor[2]
    sexActors[0] = Test2
    sexActors[1] = Test1
 
    ; // Initialize our animation array as empty, so SexLab will pick the animations based on defaults
    sslBaseAnimation[] anims
 
    ; // "Buisness Time"
    SexLab.StartSex(sexActors, anims)
 
endFunction
 
Actor Property Test1 Auto
Actor Property Test2 Auto
 
 
I am using test actors before trying with normal npcs so as to see how things work out. If anyone could help this pitiful noob out, I would be grateful. 
Posted

If you already have filled the Test actor properties the easiest way to fire your script is to make a magic effect and attach your script to it (it should extend ActiveMagicEffect and your function should trigger on OnEffectStart).

 

E.g. like this: 

scriptname TestSex extends ActiveMagicEffect
{...}

SexLabFramework property SexLab auto

event OnEffectStart(actor target, actor caster)
	
	TestSex()
	
endEvent
Then you need to create a spell, give it a simple name, remember it and attach the magic effect to it.

You need to give the spell a magic school, otherwise your game crashes when you open your spellbook.

 

In-game open the console and type "help <spell name>" and then "player.addspell spell_ID".

Posted

Thanks for replying. I will try this when I get home, but this will make it so it only fires when the player casts the spell right? What I am looking for is a way for the script to fire automatically around the same time every day, whether the player is involved or not. I was experimenting with quests and packages, but I'm not much use in the CK beyond making custom followers and basic stuff like that. The way you suggest, I would have to make a spell for every couple, right? And it would only fire once, like Matchmaker?

Posted

Yes, it only triggers once; I thought you only wanted to test if your code works.

 

What could work is to use RegisterForSingleUpdate to check if GameTimeToString is between 20 and 22 o'clock every 10 seconds or so and then trigger your code.

Not sure if that's the smartest idea, though; maybe a similar function already exists in the CK.

 

The page with most Papyrus commands:

http://www.creationkit.com/Category:Papyrus

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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