Jump to content

Magic Effect which triggers sexlab orgasm.


Recommended Posts

Posted

Hello folks, i really need your help here.

The idea is to make a spell which, when its projectile hits a female, triggers the sexlab orgasm event (on the player and the npc)
The idea is to make the npc pregnant from the player without the need to run a sexscene.
My problem is that i dont have a clue how this sexlab trigger works.

I managed to write scripts for starting sex scenes  certain on keywords but not hot to trigger sexlab events directly.

Is it even possible to bypass animations?

 

I came up with this idea, the script compiles but nothing happens:

Event OnEffectStart(Actor Target, Actor Caster)
    If Target 
        If Target != Game.GetPlayer()
            SexLab.TrackActor(Target, "OrgasmEnd")
            SexLab.TrackActor(Caster, "OrgasmEnd")
            RegisterForModEvent("OrgasmEnd", "Virtualsex")
            SexLab.SendTrackedEvent(Target, "OrgasmEnd", 123)
            SexLab.SendTrackedEvent(Caster, "OrgasmEnd", 123)
        EndIf
    EndIf
EndEvent      
    Event Virtualsex(Form FormRef, int tid)
        Debug.MessageBox("The Actor "+(FormRef as actor).GetDisplayname()+" just has been bamboozled " + tid)
     UnRegisterForModEvent("OrgasmEnd")
EndEvent

 

 

Posted (edited)

You're probably using the wrong event names. Quoting the SL documentation:

 

* * The actual event name that is sent is the <callback defined to track the actor>_<hook name>, and you have to RegisterForModEvents with this name to being able to receive them.
* * SexLab.TrackActor(myActor, "MyCallBackName")                                            <-- Track the actor for "MyCallBackName"
* * RegisterForModEvents("MyCallBackName_ThisIsATest", "WeReceivedTheCustomEvent")          <-- Register for events "MyCallBackName_ThisIsATest"
* * SexLab.SendTrackedEvent(myActor, "ThisIsATest", 123)                                    <-- Send a specific event "ThisIsATest"
* * Event WeReceivedTheCustomEvent(Form FormRef, int tid)
* *   [...some code...]
* * EndEvent  

 

So you'd probably need to change your script to something like 

 

            RegisterForModEvent("OrgasmEnd_MyHook", "Virtualsex")
            SexLab.SendTrackedEvent(Target, "MyHook", 123)

 

At least, I think. I can never get the hook names right the first time I try either, it always takes some careful reading and trial & error before I get them right.

Edited by Frayed
Posted
22 hours ago, Frayed said:

You're probably using the wrong event names. Quoting the SL documentation:

 

* * The actual event name that is sent is the <callback defined to track the actor>_<hook name>, and you have to RegisterForModEvents with this name to being able to receive them.
* * SexLab.TrackActor(myActor, "MyCallBackName")                                            <-- Track the actor for "MyCallBackName"
* * RegisterForModEvents("MyCallBackName_ThisIsATest", "WeReceivedTheCustomEvent")          <-- Register for events "MyCallBackName_ThisIsATest"
* * SexLab.SendTrackedEvent(myActor, "ThisIsATest", 123)                                    <-- Send a specific event "ThisIsATest"
* * Event WeReceivedTheCustomEvent(Form FormRef, int tid)
* *   [...some code...]
* * EndEvent  

 

So you'd probably need to change your script to something like 

 

            RegisterForModEvent("OrgasmEnd_MyHook", "Virtualsex")
            SexLab.SendTrackedEvent(Target, "MyHook", 123)

 

At least, I think. I can never get the hook names right the first time I try either, it always takes some careful reading and trial & error before I get them right.

thank you for your advice but it still does nothing

Posted

Reading this again, I think I didn't provide a solution to what you wanted to accomplish anyway: what I wrote would have the function fire when SL sends the event, but it wouldn't trigger it itself. I don't think SL's API gives you the option to manually trigger those events. You may need to find another way to accomplish your goal, probably by looking whether whatever pregnancy mod you were thinking about has a function you can use. 

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...