Jump to content

I'm making a mod that allows the PC to spank npcs via a lesser power. Need tiny help with the script


Recommended Posts

Posted

Title. Everything is done and it works in-game but the only thing is the alignment is incorrect. The npc basically stands "inside" the player as if there are no collisions between them. I'm using Baka Data Motion Pack for the animations and he has provided a script example. In it he says that I should create a DummyXmarker but I have no idea how. Google is not even helpful.  aktarget.moveto(Game.GetPlayer()) makes the actor move inside the player. 

 

I'm going to paste in his script example to clarify the problem:

 

ObjectReference Property DummyXmarker Auto; You should create a new xmarker
Package Property Donothing Auto; You can make your own Donothing Package
Actor Property PlayerRef Auto

Function PairedMotion(Actor akactorM, Actor akactorF, int angle, int Xaxis, int Yaxis, int MotionType, Bool AcycleM)
     ActorUtil.AddPackageOverride(akactorM, Donothing, 100, 1)
    akactorM.EvaluatePackage()
    akactorM.SetRestrained()
    akactorM.SetDontMove(True)
    if akactorF == PlayerRef
        Game.DisablePlayerControls(true, true, true, false, true, true, false, false)
        if Game.GetCameraState() == 0
            Game.ForceThirdPerson()
        endIf
    endif
    Utility.Wait(0.5)
    Float AngleZ = akactorF.GetAngleZ()
    Float rMoveX = (Math.sin(AngleZ) * Yaxis) + (Math.cos(AngleZ) * Xaxis)
    Float rMoveY = (Math.cos(AngleZ) * Yaxis) - (Math.sin(AngleZ) * Xaxis)
    
    DummyXmarker.MoveTo(akactorF, rMoveX, rMoveY)
    
    Utility.Wait(0.5)
    akactorM.MoveTo(DummyXmarker)
    akactorM.setangle(0, 0, AngleZ + angle)
    Utility.Wait(0.5)

    if MotionType == 1;Acycle motion
        Debug.sendanimationevent(akactorM, "BaboSpankingM")
        Debug.sendanimationevent(akactorF, "BaboSpankingF")
    elseif MotionType == 2;Cycle motion
        Debug.sendanimationevent(akactorM, "BaboBackHugStartM")
        Debug.sendanimationevent(akactorF, "BaboBackHugStartF")
    elseif MotionType == 3;Cycle motion
        Debug.sendanimationevent(akactorM, "BaboBackHugMolestStartM")
        Debug.sendanimationevent(akactorF, "BaboBackHugMolestStartF")
    endif

    if AcycleM;Male Actor Acycle motion
        akactorM.SetRestrained(False)
        akactorM.SetDontMove(False)
        ActorUtil.RemovePackageOverride(akactorM, Donothing)
    endif

endif
EndFunction



The first problem is my script extends to activemagiceffect and it does not take any params other than both actors. Figured that these other params could be used as properties. We probably don't need need MotionType or Acycle motion so their section could be ignored. I just need to figure out how to create this Xmarker. Any help would be appreciated. 

 

Posted
16 minutes ago, Tlam99 said:

Marker is not an objectreference but a form.

So how do you create it? I asked chatGPT and it said that I should pick a cell and place the marker there or some shit and it said that the marker doesn't work outside that particular cell. I know chatgpt is not that good with the creation kit and papyrus so it could be bs.

Posted
1 hour ago, valencia said:

So how do you create it? I asked chatGPT and it said that I should pick a cell and place the marker there or some shit and it said that the marker doesn't work outside that particular cell. I know chatgpt is not that good with the creation kit and papyrus so it could be bs.

Precisely why you should communicate with humans and not an invented AI fad...

Posted
4 hours ago, FauxFurry said:

Maybe you could examine this mod to see how it is done. That or actually ask Shadowman2777 how to pull this off rather than asking a machine.

 

I saw it and I tried to backport it cause I'm on LE but it can't be done since the animations have behaviors. Tried using the original LE animations with the same logic but still didn't work. I don't want to use the Sir nibbles one since Baka has a couple of animations like backhug, choke etc that the same logic could be applied to. That's why I want to figure out this xmarker shit so I could apply it to all of his animations.

 

Also why is everybody mad at an AI? That fucker is literally more helpful than 99% of the population. It struggles with papyrus because there's not a lot of written text on the internet about it. 

Posted
26 minutes ago, valencia said:

I saw it and I tried to backport it cause I'm on LE but it can't be done since the animations have behaviors. Tried using the original LE animations with the same logic but still didn't work. I don't want to use the Sir nibbles one since Baka has a couple of animations like backhug, choke etc that the same logic could be applied to. That's why I want to figure out this xmarker shit so I could apply it to all of his animations.

 

Also why is everybody mad at an AI? That fucker is literally more helpful than 99% of the population. It struggles with papyrus because there's not a lot of written text on the internet about it. 

I am no more mad at AI than I am mad at ballpeen hammers. They are just tools.

Humans are still wellsprings of knowledge that should not be overlooked especially when certain bits of information have yet to be programmed into the AI.

Maybe databases will have everything that modders currently know input into them someday. Today is not that day, however. 

Posted

Update: Figured it out. Now I'll add some additional tweaks like giving the npc a facial expression and Imma fix the script that adds the lesser power automatically to the player. Might release it today or tomorrow max. Fucking finally.

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