Jump to content

Cutscene script attached to triggerbox not working


Lerigonith

Recommended Posts

SOLVED - SEE BELOW

I made this post originally in the Skyrim Mod Troubleshooting subforum (wrong place on both counts, yikes) so I"m going to make it again here and I guess... report my own topic for being in the wrong place? Anyways, I need help with a script I made.

So I'm making a mod in CK 64bit and I've made a script that should be forcing the player character through a cutscene...

Scriptname MTQ01CutsceneScript extends ObjectReference

Actor Property PlayerREF Auto
ObjectReference Property Point1 Auto
ObjectReference Property Point2 Auto

Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF
PlayerREF.SetAlpha(0.0)
PlayerREF.SetGhost(True)
Game.DisablePlayerControls(True, True, True, False, True, False, True)
Utility.Wait(1.1)
PlayerREF.TranslateToRef(Point1, 100.0)
Utility.Wait(5.0)
PlayerREF.TranslateToRef(Point2, 50.0)
Utility.Wait(20.0)
PlayerREF.SetAlpha(1.0)
PlayerREF.SetGhost(False)
Game.EnablePlayerControls()
EndIf
EndEvent

The triggerbox is shown in CK below, with the two xmarkers (Point1 and Point2 defined in properties and tagged by reference) and there are two other triggers that are running successfully that overlap this one. One sets a quest stage and the other starts a scene dialogue.

Hr2PEli.png

I also have the primitive settings for the trigger and the reference window for the scrip showing the link to the xmarker

2j2urZe.png

Hr2PEli.png

When the player character runs into the trigger box area (even on new saves) there's just...nothing. They run right through it and the other two triggerbox scripts work fine. Is there something I"m missing here?

Edited by Lerigonith
Link to comment
Share on other sites

As an update I've gone through several iterations of the script and also cannot verify if the triggerbox even works (I attached a sound to it and the sound doesnt play either)

EDIT: I've also made sure I have a Papyrus log and it's always empty, even with a Debug.Trace function attached to the script =/

Edited by Lerigonith
Link to comment
Share on other sites

So I actually found a workaround for this. Since I already had a triggerbox that was successfully running a startscene script, I just went into the Edit Data tab for the scene and added some of my script in fragments in the begin and end boxes, like so:

 

begin

utility.wait(3) ; just to add a delay since the scene triggers in the start of a hall
Game.DisablePlayerControls(True, True, True, False, True, False, True)
Game.SetPlayerAIDriven(True)

end

utility.wait(0.5) ; again, just to let the script catch up
Game.EnablePlayerControls
Game.SetPlayerAIDriven(False)

I'm also gonna try getting the Alpha and Ghost settings working right, but basically, if you were looking for a good way to scrip a forced cutscene when a scene with dialogue is triggered by something like a defaultStartScene triggerbox, this is a way to do it.

 

Now I just have to figure out why the heck my NPC refuses to use the travel to Falkreath package I gave her

Link to comment
Share on other sites

  • Recently Browsing   0 members

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