Dracomies Posted September 17, 2016 Share Posted September 17, 2016 Hi! How do you make it so that a screen goes black and an NPC disappears. Basically I'm doing a quest and the moment character X stops talking to you, the screen goes black. Then it clears up and character X is now gone forever. How do I do this in a script? Link to comment Share on other sites More sharing options...
RoyBatterian Posted September 18, 2016 Share Posted September 18, 2016 It depends on how you want to do it, with a quest or with a trigger volume. The latter is better if this dialogue is always going to occur in the same cell as you can just disable and delete the volume to stop the script from running, as well as it only running if your in the same cell. With a quest it will bog down the quest chain, but you can always start and stop the quest too, it depends on how you want to implement it. For a quest it will be a quest script, and for a trigger volume it will be an object script. If you use a trigger, it just has to be in the same cell and out of the way somewhere. I set them to 2 units wide to cut down on collision checking overhead. The scripting is fairly simple, it some cascaded stages to run the image space modifiers and a timer to let the fade out complete before doing your npc stuff. Hope this helps. scn fadetoblackscript int iStage float fTimer begin gamemode if iStage == 1 ; if iStage is 1 start fade out, set timer and set next stage imod FadeToBlack2sISFX set iStage to 2 set fTimer to 2 endif if iStage == 2 ; if iStage is 2 wait for time out then do NPC stuff and set next stage if fTimer < 0 ; do npc stuff set iStage to 3 else set fTimer to fTimer - GetSecondsPassed endif endif if iStage == 3 ; if iStage is 3 start fade in and set next stage to comeplete sequence imod FadeInFromBlack2sISFX set iStage to 4 ;disable ; uncomment this if you use a trigger volume instead of a quest ;markfordelete endif End Link to comment Share on other sites More sharing options...
Dracomies Posted September 18, 2016 Author Share Posted September 18, 2016 Thanks roy! I'll send you a message and give you more details! Link to comment Share on other sites More sharing options...
Recommended Posts