FalloutBeast Posted May 31, 2012 Share Posted May 31, 2012 So I want to make a event where at a certain marker, the player will no longer be able to move and the screen will shake. Along with this, a voice will boom at them. Can anyone help with this? I have the script for stopping the player. Any help would be great thanks! Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 1, 2012 Author Share Posted June 1, 2012 Bump. Link to comment Share on other sites More sharing options...
steve40 Posted June 1, 2012 Share Posted June 1, 2012 (edited) You will need to place a Trigger Primitive that will activate when the player enters it. Attach a script to this. The script will need to have an OnActivate block, in which you can use the following functions to achieve the effect you want: DisableplayerControls, EnablePlayerControls, ShakeCamera, Play (sound). You will need to add your voice recording as a wav file. You do this by creating a new SoundDescriptor form in the CK that points to the wav file, then a SoundMarker form that points to your SoundDescriptor. You can then pass the SoundMarker into your script as an auto property. Edited June 1, 2012 by steve40 Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 1, 2012 Author Share Posted June 1, 2012 (edited) You will need to place a Trigger Primitive that will activate when the player enters it. Attach a script to this. The script will need to have an OnActivate block, in which you can use the following functions to achieve the effect you want: DisableplayerControls, EnablePlayerControls, ShakeCamera, Play (sound). You will need to add your voice recording as a wav file. You do this by creating a new SoundDescriptor form in the CK that points to the wav file, then a SoundMarker form that points to your SoundDescriptor. You can then pass the SoundMarker into your script as an auto property.Thank you, But I am not much of a scripter. I understand how to use mostly everything except that auto property. Edited June 2, 2012 by FalloutBeast Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 2, 2012 Author Share Posted June 2, 2012 You will need to place a Trigger Primitive that will activate when the player enters it. Attach a script to this. The script will need to have an OnActivate block, in which you can use the following functions to achieve the effect you want: DisableplayerControls, EnablePlayerControls, ShakeCamera, Play (sound). You will need to add your voice recording as a wav file. You do this by creating a new SoundDescriptor form in the CK that points to the wav file, then a SoundMarker form that points to your SoundDescriptor. You can then pass the SoundMarker into your script as an auto property.Thank you, But I am not much of a scripter. I understand how to use mostly everything except that auto property.hmmm i have been trying to make a script for this but it is not working well. Is there any chance you could make one(I can fill in the variables and those parts, I just cant get it to all work together.) Link to comment Share on other sites More sharing options...
scrivener07 Posted June 2, 2012 Share Posted June 2, 2012 Edit: Added a short wait so the disable player control will last for ~1sec Scriptname ShakeSceneTriggerScript extends ObjectReference ;/ Attach this script to a new triggerbox. Its the red one I think. Do what steve said about the sound ;/ ;Be sure to point this to your effect by opening the properties window. Sound Property mySoundEffect Auto ;Fires when player enters tigger box Event OnTriggerEnter(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) ; This condition ensures that only the player will trigger this code PlaySceneEffect() Utility.Wait(1) RecoverFromScene() Endif EndEvent Function PlaySceneEffect() Game.DisablePlayerControls(true, true, false, false, false, false, true, false) mySoundEffect.Play(self) Game.ShakeCamera() Game.ShakeController(0.5, 0.5, 2.0) EndFunction Function RecoverFromScene() Game.EnablePlayerControls(True) EndFunction Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 2, 2012 Author Share Posted June 2, 2012 Scriptname ShakeSceneTriggerScript extends ObjectReference ;/ Attach this script to a new triggerbox. Its the red one I think. Do what steve said about the sound ;/ ;Be sure to point this to your effect by opening the properties window. Sound Property mySoundEffect Auto ;Fires when player enters tigger box Event OnTriggerEnter(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) ; This condition ensures that only the player will trigger this code PlaySceneEffect() RecoverFromScene() Endif EndEvent Function PlaySceneEffect() Game.DisablePlayerControls(true, true, false, false, false, false, true, false) mySoundEffect.Play(self) Game.ShakeCamera() Game.ShakeController(0.5, 0.5, 2.0) EndFunction Function RecoverFromScene() Game.EnablePlayerControls(True) EndFunction Great! Thanks! Link to comment Share on other sites More sharing options...
steve40 Posted June 3, 2012 Share Posted June 3, 2012 That script should work nicely :happy: I was going to suggest waiting in between disabling and re-enabling the player controls, but I see scrivener has already updated his script :thumbsup: Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 3, 2012 Author Share Posted June 3, 2012 That script should work nicely :happy: I was going to suggest waiting in between disabling and re-enabling the player controls, but I see scrivener has already updated his script :thumbsup:Yep, I will most likely have the wait a bit longer before player controls are given back though..hehe Link to comment Share on other sites More sharing options...
FalloutBeast Posted June 5, 2012 Author Share Posted June 5, 2012 You will need to place a Trigger Primitive that will activate when the player enters it. Attach a script to this. The script will need to have an OnActivate block, in which you can use the following functions to achieve the effect you want: DisableplayerControls, EnablePlayerControls, ShakeCamera, Play (sound). You will need to add your voice recording as a wav file. You do this by creating a new SoundDescriptor form in the CK that points to the wav file, then a SoundMarker form that points to your SoundDescriptor. You can then pass the SoundMarker into your script as an auto property.Thank you, But I am not much of a scripter. I understand how to use mostly everything except that auto property.hmmm i have been trying to make a script for this but it is not working well. Is there any chance you could make one(I can fill in the variables and those parts, I just cant get it to all work together.) Ok, so I put it on a trigger and did everything you guys told me to, but when I walk through it nothing happens....what went wrong? Did I use the wrong trigger primitive or something like that? Link to comment Share on other sites More sharing options...
Recommended Posts