Jump to content

VRIK API Help


Recommended Posts

Hello

 

Thanks for any spare time you have to respond.

 

I am attempting to create a mod to allow jogging in place to move the player forward. Intended as a exercise mod that disables when combat is entered, enables when combat is done.

 

I am hoping to use VRIK to track head (maybe hands too) movement.

I am having some troubles getting code that calls VRIK.VrikGetHmdZ() to compile.

Likely it is due to my very very basic understanding of CK and papyrus.

I do program for work and in my spare time. This is my first CK project though.

 

To start I just want to make a basic, notifies where the player's head is on init.

I have this script attached to a quest.

I currently lack further CK papyrus skills at the moment for more complex coding.

To start I was going to put the code in CheckHeadPos state in a loop. Track previous head movements. When upward downward movement found, move the character forward.

 

I have attempted making certain vrik.esp is loaded with my other required data files (updates.esm, skyrimvr.esm...)

I did notice that when I attempted to call VRIK.psc from the creation kit script manager VRIK.psc was not in the data/source/scripts folder. I manually moved it to that folder.

 

The code below will not compile when `VRIK.VrikGetHmdZ()` is in it.

Scriptname HeadTrackScript extends Quest
{Tracks z position of Players head.}

Float head_z_pos = 0.0

Event OnInit()
    Debug.Notification("Head track init.")
    GotoState("CheckHeadPos")
EndEvent

State CheckHeadPos
    Event OnBeginState()
        head_z_pos = VRIK.VrikGetHmdZ()
        Debug.Notification("Head Z position: "+head_z_pos)
        Utility.Wait(0.1)
    EndEvent
EndState

I am fairly confident this is a lack of general knowledge issue.

Thanks again for any spare time you may have.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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