Jump to content

SCript Help


Roycesraphim

Recommended Posts

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

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 gunshot

Playsound richochete

 

Playsound gunshot

Playsound richochete

 

Playsound gunshot

Playsound 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 by prensa
Link to comment
Share on other sites

  • Recently Browsing   0 members

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