Jump to content

Script Help


Carloss32

Recommended Posts

Posted

Hi all just need a little advice, i have a mod that add dialog to people, i have it set so it will start animations between the PC and whoever they are talking to that works fine.

 

Now im trying to set it up so that the person you are talking to hunts within a given radius to find a partner to start an animation with but cant seem to get it to work right, so my question is does anyone have advice on this type of scripting???

Posted

My solution:

 

First I have a quest with two alias:

  • victim - with a do-nothing package (optional with a surrender idle), you need it to avoid that the victim is leaving the cell.
  • forcedrapist - with a travel package that travels to the victim alias - and that starts something in the package end script (for example raping the victim in my case)

Second I have a magic effect:

  • Fire & Forget
  • Aimed
  • Script:
Scriptname MariaEdensCreateRapist extends activemagiceffect  

ReferenceAlias Property forcedrapist  Auto
ReferenceAlias Property Victim  Auto  
SexLabFramework Property SexLab  Auto  
Actor Property PlayerRef auto

event OnEffectStart(Actor akTarget, Actor akCaster)
	if SexLab.IsValidActor(akTarget)
		; first try to find a partner with opposite sex
		int gender = -1
		if akTarget.GetActorBase().GetSex() != 1
			gender = 1
		else
			gender = 0
		endif

		Actor newVictim = SexLab.FindAvailableActor(akTarget,2000.0,gender,PlayerRef)
		
		if newVictim == none
			; then try find any partner
			newVictim = SexLab.FindAvailableActor(akTarget,2000.0,-1,PlayerRef)
		endif

		if newVictim != none
			Debug.Notification(akTarget.GetDisplayName() + " is going to rape " + newVictim.GetDisplayName())
			Victim.ForceRefTo(newVictim)
			forcedrapist.ForceRefTo(akTarget)
		endif
	endif
endevent

And last but not least I have a spell with this effect.

 

By the way - the rapist package end script releases both alias after starting the sexlab animation

 

The result:

I can cast a spell on a target (akSpeaker in your case) - and this target npc will become a rapist that searches for a victim  - runs to this victim and do bad things with him.

Posted

You might need no spell and add my magic effect script to the topic script - but my intention is to have a "rapist" recruiting shooter spell that I use to engage enemies in sex animations so I can pass them without fights.

Posted

I can't explain the Papyrus and CK basics - for this you should absolve some of the great tutorials at youtube.

 

Fact is you need to fill a reference alias with an actor and assign packages to the alias to make this actor doing anything - my script example is only the starter : find a second actor with the help of sexlab - because finding actors using vanilla papyrus is more complicated.

Archived

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

  • Recently Browsing   0 members

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