JonaNoir Posted August 5, 2017 Share Posted August 5, 2017 (edited) Ok, first off let me say I know almost nothing about creating script. And what little I do know is purely theoretical. So I will very likely need the scripts written for me, and detailed instructions on how to set it up. Anyone who can help me with this, will of course get credit for they're help when the mod is completed & released. I need to set up a cutscene in which the Player is knocked unconscious and wakes up in a dungeon cell (from which they now have to escape!). So what I need is, a script to attach to a trigger box that (when entered): 1st. Disable the Player's control of they're character.2nd. Force the Player into "first-person".3rd. Play the audio of the Player getting punched.4th. Play the "first-person" animation (and audio) of the Player getting knocked down.5th. Fade to black.6th. Move the Player to a new cell7th. Progress time.8th. Fade back in.9th. Play the "first-person" animation (and audio) of the Player getting back up.10th. Return control to the Player.11th. Adds a new quest to the Player.12th. Disable trigger box. I think I also might need somewhere a condition that if the Player is currently a "Werewolf" or "Vampire Lord" when activating the trigger, that they revert back to being human after getting knocked out but before waking up. Any and all help given is greatly appreciated. P.S.For a little context, here's what my mod adds to Skyrim. My mod adds a third "Dark Brotherhood Sanctuary" to Skyrim, that is located in a cave connected to the bottom of a well. Upon the completion of the related quest it can be made into the Player's very own hideout. A perfect home for a murderous up and coming Assassin! -The Story-This sanctuaryis inhabited by it's vampiric former leader (and a few ghosts. skeevers and victim), that for the last few decades has imprisoned and been feeding on his own subordinates!He has been feeding skeever meat to them all this time to keep them alive, but also to keep them weak.And upon the Player finding the entrance to his sanctuary, he capture the Player with the intention of doing to them what he has been doing to his subordinates.In order to prevent this fate, the Player will have to escape the dungeon cell they find themselves in and kill the vampire that captureed them! Edited August 5, 2017 by JonaNoir Link to comment Share on other sites More sharing options...
Lisselli Posted August 6, 2017 Share Posted August 6, 2017 (edited) My post serves as a proof of concept. There are things you wanted done that I did not know how to do, so I left those parts out. This has been tested in game(the quest bit is using info from the quest I made) and it works. It's coded to return if the quest isn't running(just checking Start() as a bool could work too, but I like checking down a ladder so to speak).There may be other(better) ways. ObjectReference property destmarker auto ; marker placed in the destination cell you want the player to move to GlobalVariable property GameHour auto ; used to progress time by a certain amount. Quest property NewQuest auto ImageSpaceModifier property FadeToBlack auto ImageSpaceModifier property FadeToBlackBack auto AUTO State Waiting Event OnTriggerEnter(ObjectReference akActionRef) Float fCurrentHour = GameHour.GetValue() Float fHoursToPass = 1.0 ; set this to how many hours you want to pass. I used 1 hour. Bool bFadeBackIn = False akActionRef = Game.GetPlayer() ; trigger will ONLY expect the player. if akActionRef == true ; disable player controls Game.DisablePlayerControls() ; force first person Game.ForceFirstPerson() ; code to play audio here FadeToBlack.Apply(1.0) utility.wait(2.2) akActionRef.MoveTo(destmarker) bFadeBackIn = True ; MoveTo pauses the script until it is finished. if bFadeBackIn == true ; fade back in FadeToBlackBack.Apply(1.5) ; progress time by how many hours you want GameHour.SetValue(fCurrentHour + fHoursToPass) ; code to play animation of player getting up + audio ; ; return controls Game.EnablePlayerControls() ; add new quest NewQuest.Start() if NewQuest.isRunning() ; make it active? NewQuest.SetActive() ; set a stage that will display objectives, or if not just call SetObjectiveDisplayed(objectivenumber) NewQuest.SetCurrentStageID(5) else ; quest is not running for some reason, check aliases if any return endif ; all done, now to say goodbye. GoToState("Done") endif endif EndEvent EndState State Done Event OnTriggerEnter(ObjectReference akActionRef) ; EndEvent EndState Edited August 6, 2017 by Lisselli Link to comment Share on other sites More sharing options...
JonaNoir Posted August 7, 2017 Author Share Posted August 7, 2017 Thanks for the script Lisselli, unfortunately I can't seem to get it to work right.It worked just fine the first few times, but then it stop fading back in after moving the PC to the dungeon.I've spent a few hours trying to figure out what went wrong, to no success...If you can figure out what's wrong that would be great, but for now I can't use it. :sad: Link to comment Share on other sites More sharing options...
TheWormpie Posted August 7, 2017 Share Posted August 7, 2017 Are you sure you've filled your imagespacemodifier properties correctly? Link to comment Share on other sites More sharing options...
Lisselli Posted August 7, 2017 Share Posted August 7, 2017 (edited) Oh yeah, the FadeToBlackBack property is for the FadeToBlackBackImod form. Maybe I should have used their actual names so all he needed to do was hit auto-fill all. Other than that, I don't know why it would stop after a certain amount of times. I use the same method(getting the screen to fade back in after being moved with moveto) with my version of mark and recall and have no problems with it. Edited August 7, 2017 by Lisselli Link to comment Share on other sites More sharing options...
JonaNoir Posted August 7, 2017 Author Share Posted August 7, 2017 :psyduck: I don't know how or why but after I deleted the original trigger and replaced it, it started to work again. The problem I have now is it won't start my quest, but that might be my fault in setting it up. I'll get back to you later if I still can't get it started. Also, I added some code to your script to enable then disable a sound marker that uses the punching sound and to disable the trigger after moving the PC to the dungeon. Link to comment Share on other sites More sharing options...
Recommended Posts