Jump to content

Question : how to detect the ID of NPC for sex scene ?


Recommended Posts

Hi everybody

 

I need a special script for a quest :

 

During that quest, I need to check the Ids of the NPCs the player who have sex with.

 

For example, I need to know of the actor if Elissif the fair or Sybille Stentor.

If it's elissif, the quest will progress.

 

Of course, I could do that by creating some specific dialogues, but I think a very nice way to do things will be making that kind of script...

 

Thanks in advance

Link to comment

Just have the actor n a Property and check it.

 

 

Actor Property Elissif Auto
Actor Property Sybille Auto
 
function blah()
...
Actor theSexPartner = ...
 
 
if theSexPartner==Elisif || theSexPartner==Sybille
 ..do the job...
endIf
 
...
 
EndFunction

 

Then fill the properties with the actors.

 

I am not sure "when" you want to check that. You can also register for a SexLab event (like AnimationEnd) to execute the checking.

 

Link to comment

Just have the actor n a Property and check it.

Actor Property Elissif Auto
Actor Property Sybille Auto
 
function blah()
...
Actor theSexPartner = ...
 
 
if theSexPartner==Elisif || theSexPartner==Sybille
 ..do the job...
endIf
 
...
 
EndFunction

Then fill the properties with the actors.

 

I am not sure "when" you want to check that. You can also register for a SexLab event (like AnimationEnd) to execute the checking.

 

1 : during the aTID2Mutator4 quest

2 ; when player have sex

 

The objective of this quest is contaminating some specific NPCs with a parasite...

 

So, I need to check the sex partner of the player. If the sexpartner is in my list of targets, the quest advance, and the NPC receive the desease.

 

Link to comment

OK. It is actually pretty easy to do.

 

 

...somewhere at the begin...
RegisterForModEvent("HookAnimationEnding", "delzWeHadSex")
....
 
 
Actor[] Property myParassitableActors Auto
 
Event delzWeHadSex(int tid, bool hasPlayer)
  if hasPlayer
    sslThreadController tc = SexLab.GetController(tid)
    Actor[] Positions = tc.Positions
    int i = Positions.length
    while i
      i -= 1
      if myParassitableActors.find(Positions[i])!=-1
        Actor parasiteDestination = Positions[i] 
        ; "Let' put a parasite here!!!!"
      endIf
    endWhile
  endIf
EndEvent
And of course remember to fill the Property with all the actors you want to be able to receive the "parasite".
Link to comment

Why it is not working?

 

In your first line "parasitedestination" looks like a ReferenceAlias.

And "add spell" will give the spell to the actor, but for sure you are not casting the spell to the actor.

 

 

You can do a bunch of IFs, not a problem, but if you have a few actors, then the option .find of an array is way faster.

 

Link to comment

Why it is not working?

 

In your first line "parasitedestination" looks like a ReferenceAlias.

And "add spell" will give the spell to the actor, but for sure you are not casting the spell to the actor.

 

 

You can do a bunch of IFs, not a problem, but if you have a few actors, then the option .find of an array is way faster.

 

I tried parasitedestination.getactorref().addspell(), but parasitedestination is not recognized as an alias.

 

Link to comment

If you look at my code "parasitedestination" was an actor, not an referencealias.

 

If you like I can provide better help, my code was just an example, but you should post the code you have, and what exactly you want to do.

 

Cordialement.

Link to comment

If you look at my code "parasitedestination" was an actor, not an referencealias.

 

If you like I can provide better help, my code was just an example, but you should post the code you have, and what exactly you want to do.

 

Cordialement.

 

Ok, je vais essayer de pondre quelque chose !

 

Link to comment

J'ai testé en mettant des "parasiteactor = specific ID" et des If et elseif de partout.

 

ça marche !

 

J'ai aussi mis une option de debug au cas où.

Le dernier point noir consiste à convertir les NPCs en followers : mon script ne marche pas à tous les coups.

 

En tout cas, TID est fini ! Il n'y a plus qu'à le fignoler !

Link to comment

Bravo !

 

Pour convertir une PNJ en Follower est-ce que tu t'appuye sur un Follower Mod (EFF, UFO, etc.) ou tu fais que une substitution des Factions et de l'alias standard?

Ou tu fais que du custom followers (donc tu mets aussi le "follower package" a' eux) ?

 

Link to comment

Bravo !

 

Pour convertir une PNJ en Follower est-ce que tu t'appuye sur un Follower Mod (EFF, UFO, etc.) ou tu fais que une substitution des Factions et de l'alias standard?

Ou tu fais que du custom followers (donc tu mets aussi le "follower package" a' eux) ?

 

Non, j'utilise ce script :

 

Function SetColinFollower()

    aTIDColinREF.setactorvalue("disposition", 80.0)

    aTIDColinREF.setrelationshiprank(game.getplayer(), 3)

    aTIDColinREF.addtofaction(PotentialFollowerFaction)

    aTIDColinREF.addtofaction(CurrentFollowerFaction)

    aTIDColinREF.SetFactionRank(PotentialFollowerFaction, 0)

    aTIDColinREF.SetFactionRank(CurrentFollowerFaction, -1)

    debug.notification("Colin is now a follower!")

EndFunction

 

D'ordinaire, ça marche bien. TID est rempli de choses comme ça, ce mod est une usine à followers !

Bon, on peut aussi sacrifier ses followers dans l'arène pour gagner de l'argent, les envoyer à la boucherie pour gagner un cœur et de la chair humaine (oui, j'ai vendu ce follower là à la boucherie), ou les donner à mander à Chaur Tegoth pour qu'il donne sa bénédiction au PJ.

 

Il y aussi un script comme ça dans Haunted House, pour convertir Elizabeth en Follower. ça marche.

 

Mais dans le cadre de Elisif infectée par le Vers Neurax, non, ça ne marche pas...

Link to comment

Archived

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

  • Recently Browsing   0 members

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