Roycesraphim Posted August 1, 2012 Share Posted August 1, 2012 I want the player to enter the room and enter a trigger box as they spawn. You hear BB gun shots and hear them richochet. Then Tom Sawyer would start his dialog because VTFISawyershotme = 1. I only want this to happen once.Scn vtfihousedogsawyershoot Begin onenter player If VTFISawyershotme == 0 Playsound gunshot Playsound richochete Playsound gunshot Playsound richochete Playsound gunshot Playsound richochete Float VTFISawyershotme Set VTFISawyershotme 1 End Link to comment Share on other sites More sharing options...
prensa Posted August 2, 2012 Share Posted August 2, 2012 (edited) Roycesraphim - Hello! I'm no scripting expert but to make a script act only once I'd use a "short". You'd do something like this: Scn vtfihousedogsawyershoot ;Set short to VTFISawyershotme short VTFISawyershotme ;Starts when the player enters the trigger zone Begin ontriggerenter player ;If it's 0 then it's not been done before so play the sounds If VTFISawyershotme == 0 Playsound gunshotPlaysound richochete Playsound gunshotPlaysound richochete Playsound gunshotPlaysound richochete ;set it to 1 to show it's been done & stop it from repeating Set VTFISawyershotme to 1 endif End Obviously you don't need the explanations I've included after ; they are ther to help. You'd attach this to the trigger that you'd set up on the side of the door where Sawyer is. Hope this helps! Prensa Edited August 2, 2012 by prensa Link to comment Share on other sites More sharing options...
Recommended Posts