Jump to content

Need help from a scripting guru


Dracomies

Recommended Posts

Hi. So I need help here. I'm making a change to Gommorah and the Atomic Wrangler.

 

I'd like to have it set so that when you are walking by a set of doors, you hear very suggestive sounds.

 

When you reach the door, it is locked with a lock skill required.

 

When you open the door, the sound stops and you see a shocked couple.

 

Then when you close the door, the sound begins again.

 

How do I do this?

 

I want the particular sound to only happen when you have closed the door and the couple is out of view.

 

Can someone explain this to me in Layman's terms on how to do this on the GECK.

Edited by Dracomies
Link to comment
Share on other sites

Really, you need a trigger to detect when the player is in range of the door. You'd then begin your script with this, and have it play the sound. You'd need to add your sound in the GECK as a new sound file (just find audio in the browser, right-click, and goto new). Select the sound to be played in there, from the select tessound option. You'd need to setup a variablee in the script as well to determine when the door is open, therefore stopping the sound. Take a look at this (just making it up off the top of my head so let's just see how it goes):

 

First, make a quest (if you haven't already got one for this whole thing to happen in). Just call it whatever you want, and give it any old ID, but please note that in the following scripts I will assume that you quest is called SuggestiveSoundQuest.

 

Ok, first script. Assign it to your quest (goto your quest and select this script from the dropdown menu). Here it is:

 

scn SuggestiveSoundQuestScript

 

short doorOpen ;0 == No, 1 == Yes

 

Ok, that was nice and easy. Here's the next script. Assign it to your trigger:

 

scn SuggestiveSoundTriggerScript

 

begin onTriggerEnter Player

if SuggestiveSoundQuest.doorOpen == 0

PlaySound SuggestiveSound ;Just replace SuggestiveSound with whatever you call your sound file

endif

end

 

You'd need to assign this script to the trigger. The only issue is that doorOpen needs to be updated. You could do this by using a script on the door itself:

 

scn SuggestiveSoundDoorScript

 

begin gameMode

if getOpenState == 1

set SuggestiveSoundQuest.doorOpen to 1

elseif getOpenState == 0

set SuggestiveSoundQuest.doorOpen to 0

endif

end

 

Ok, done. Please let me know if any of this works for you!

Link to comment
Share on other sites

Oh, and as for the lock skill and the couple, just double-click the door which you are using, and goto lock, and then set the lock level which you want. As for the shocked couple, I presume that you know how to make NPCs, but, if not, then just look up a tutorial somewhere. It's really easy to do.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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