Jump to content

GECK Question - Scripting Issue


Recommended Posts

Hi Guys,

 

Still very new here, however I hope to tap into your collective knowledge.

 

I have been trying to modify the vanilla version of the Chinese Stealth Suit. Through some fiddling I have managed to get the cloaking to work properly, however I'm trying to get the StealthBoy activation sound to play when entering and exiting crouching.

 

After messing about a bit, I decided that the best solution would be to write a script and associate it to the armor itself.

 

Now, just to be clear, I am *very* green at the whole scripting and modding thing, I have literally zero experiece, so please keep that in mind when responding.

 

Initially I looked at Lily's script to get some ideas, and I believe i've found the portion that describes the action i require, however when I attempt to rework it for my own purposes the GECK won't let me save the script, indicating an error somewhere.

 

I have scoured the net in an attempt to find a solution to my problem, but I haven't found anything.

 

Where am I going wrong? Heck, am I even approaching this from the right angle? Is there an alternative to a script that I should be investigating?

 

Lily's script and the script I wrote are below.

 

Thank you very much!

----------------------------------------------My Script--------------------------------------------------------

scn StealthArmorCloakingSound

Begin GameMode

    Player.IsSneaking == 1
        If (SoundCheck == 0)        
            PlaySound OBJStealthBoyActivate
            set soundcheck to 1;
        EndIf
    End

    Player.IsSneaking == 0
        If (SoundCheck == 1)
            PlaySound OBJStealthBoyActivate
            set soundcheck to 0;
        EndIf
    End

END

---------------------------------------------Lily's Cloaking Script--------------------------------------------

BEGIN GameMode

    if bBreaking == 1 && FollowerSwitchAggressive == 0
        set FollowerSwitchAggressive to 1
    endif

    If (VNPCFollowers.bLilyHired == 1)    
        If (Player.IsSneaking == 1) && (bCloaked == 0)
            PMS NightkinCloakFXShader 1
            AddSpell StealthBoyInvisibilitySpell;
            Set bCloaked to 1;
            LilyREF.PlaySound3D OBJStealthBoyActivate
        EndIf

        If (Player.IsSneaking == 0) && (bCloaked == 1)
            PMS NightkinCloakFXShader 1
            RemoveSpell StealthBoyInvisibilitySpell;
            Set bCloaked to 0;
            LilyREF.PlaySound3D OBJStealthBoyActivate;
        EndIf
    
        If (GetAnimAction == 2) && (bCloaked == 1)
            RemoveSpell StealthBoyInvisibilitySpell;
            set bCloaked to 0;
            PMS NightkinCloakFXShader 1;
            If (SoundCheck == 0)
                LilyREF.PlaySound3D OBJStealthBoyActivate;
                set soundcheck to 1;
            EndIf
        EndIf
    EndIf

END

----------------------------------------------------------------------------
Link to comment

the mistake in your part is you didn't declare "soundcheck" variable.


scn StealthArmorCloakingSound

int soundcheck

Begin GameMode

But about lily's part, you can't mix lily script in that way, you should rewrite it using your own specific variables

 

If you want to do some scripting, I suggest you to learn the basics or it will be harder.

 

You can check these:

http://www.loverslab.com/topic/33245-geck-scripting-from-fool-to-fox/

http://www.loverslab.com/topic/33181-scripting-in-fallout-new-vegas-for-dummies/

Link to comment
A.J.

 

 

But about lily's part, you can't mix lily script in that way, you should rewrite it using your own specific variables

 

I should clarify that I put Lily's script in my post as a refence so you could see where I had got my ideas; My acutal script only has what I wrote under the "My Script" heading.

 

Thank you for the info, I tried declaring the soundcheck variable but it still refuses to save.

Link to comment
Guest tomm434
I've downloaded the power-up as well. Hopefully that will make things easier in the future.

of course it will. Don't leave  home without it.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use