Jump to content

How to made NPC/NPC scene like Radiant prostitution ?


Recommended Posts

Posted

Hi

 

I met a curious problem.

 

One of my little side quests is focused on Red Riding Hood (=RRH), from AFS.

 

In this quest, you can ask to RRH to cath you a dinner (you're a werewolf, RRH only love werewolf, and i will made her companion obnly for werewolves). RRH is supposed to scan the cell, and to report if she find a appropriate NPC (not essential, not forsworn) or not.

If she suceed, she goes to ,eet the NPC, and bring him to you...

 

In radiant protituion, there is scene with NPC/NPC prostitute/client... Myabe its a good clue.

 

Can you give me some tricks ?

 

Thanks.

Posted

Hello, I don't know Radiant Prostitution, but the thing you are trying to accomplish is quite easy.

 

First you need something to start it: a dialogue, an armor, a spell, whatever you can attach a script to.

 

Then in the actual Scene, if I understand correctly, you want a "Subject" that will be found and eaten, and a wolf/werewolf that will do the eating, and then comes back to somebody (player? NPC?)

 

 

In the quest create two referencealias, set them to optional (this will simplify things) and "Specific actor" set to None.

 

In the code you will attach to your starting item, set the reference aliases to the basic characters (the werewolf if I understand.)

Then execute a one time only search in the cell to find appropriate NPCs.

 

something like

Cell theCell = theSourceNPC.getParentCell()
int num = theCell.getNumRefs(43)
while num
  num -= 1
  Actor act = (Actor)theCell.getNthRef(num, 43)
  if (act && <place here your conditions> && act.getleveledActorBase().getRace()!=myForbiddenRace)
    ; Got it
    myRefAliasEater.forceRefTo(theSourceNPC)
    myRefAliasEaten.forceRefTo(act)    myScene.forceStart()    return
  endIf
endWhile

You may want to re-execute it in a little while in case you don't find any valid NPC, you can do it by a RegisterForSingleUpdate(30.0), and by placing the code inside the OnUpdate() event.

 

Then in the scene add the two ref aliases, add a package "DoNothing" to the Eaten, add a package Travel to the Eater (with target location set to the other refalias); then add a second package after to actually "Eat" (no idea about what to use here), and then make the other NPC disappear (akActor.disable(True))

Then the next package will be another travel with target location the Player or whoever you want.

 

These are the basics to create a scene like this.

 

 

 

 

Posted

Not completely...

Let me develop my explenation

 

- The werewolf is the player.

 

- RRH is a follower.

 

- In werewolf form, you can talk to her to order her to find a dinner for you.... she will scan the cell in attmpt to find an appropriate NPC.

- If she find a available NPC, RRH will go to meet them (follow or travel Package).

- Qfter a dialogue scene between RRH and the NPC, the NPC will follow RRH. RRH is travelling back to the player

- Plqyer can kill the NPC....

Posted

Ok, more or less it will work in the same way.

 

Just one point: the scene has to involve the player? If yes, then you need to disable player AI, to make him/her to execute the packages on the scene.

 

The scene can be started by a topic fragment in the dialogue. (More or less the same code I wrote.)

No "EAT" package then, but a couple of dialogue (one for each phase!!!!) to make them to exchange some lines.

Then the travel package again, then the last phase of the scene for RRH should be kept empty (to release the NPC), while the "Eaten" refalias should have a wait package to give to the player the time to attack/kill it.

 

Posted

No problem at all.

The scene can be run as many times you want.

The dialogue will always start it.

 

If the player in not involved you don't need an alias for it and you don't need to disable its AI.

 

Posted

I got that

 

Starting 1 compile threads for 1 files...
Compiling "AFS6WerewolfDialoguesRRHHuntScript"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AFS6WerewolfDialoguesRRHHuntScript.psc(13,21): required (...)+ loop did not match anything at input 'theCell'
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AFS6WerewolfDialoguesRRHHuntScript.psc(14,53): mismatched input '=' expecting RPAREN
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AFS6WerewolfDialoguesRRHHuntScript.psc(14,60): required (...)+ loop did not match anything at input ')'
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AFS6WerewolfDialoguesRRHHuntScript.psc(17,32): required (...)+ loop did not match anything at input 'myScene'
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AFS6WerewolfDialoguesRRHHuntScript.psc(17,56): required (...)+ loop did not match anything at input 'return'
No output generated for AFS6WerewolfDialoguesRRHHuntScript, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on AFS6WerewolfDialoguesRRHHuntScript

 

 

the scene thing, normal, i dont already created it... but the cell bool...

Posted

Cell theCell = playerref.getParentCell()
int num = theCell.getNumRefs(43)
while num
  num -= 1
  Actor act = (Actor)theCell.getNthRef(num, 43)
  if (actorNPC.isinFaction(AFSFriendForswornFaction) = false)
    ; Got it
    HunterRRH.forceRefTo(AFSRRHREF)
    Prey.forceRefTo(act)        myScene.forceStart()    return
  endIf
endWhile
 

Posted

Ok, I hope you have all your properties correctly set up... You did not paste them. I added them just in case.

Cell theCell = PlayerRef.getParentCell()
int num = theCell.getNumRefs(62) as int ; "A cast is necessary here"
while num
  num -= 1
  Actor act = theCell.getNthRef(num, 62) As Actor  ; "A cast is necessary here"
  if (act && !act.isDisabled() && act!=PlayerRef && act!=AFSRRHREF && !act.isinFaction(AFSFriendForswornFaction))
    ; " You want first to check if the actor exists, then if it is NOT the player, and if it is NOT your RRH. And then the faction"

    ; "Got it"
    HunterRRH.forceRefTo(AFSRRHREF)
    Prey.forceRefTo(act)
    myScene.forceStart()
    return
  endIf
endWhile

Actor property PlayerRef Auto
Actor Property AFSRRHREF Auto
ReferenceAlias Property HunterRRH Auto
ReferenceAlias Property Prey Auto
Scene Property myScene Auto
Faction Property AFSFriendForswornFaction Auto
 

Archived

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

  • Recently Browsing   0 members

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