Jump to content

Xena95

Supporter
  • Posts

    17
  • Joined

  • Last visited

Posts posted by Xena95

  1. Hi uhmattbravo,

     

    Thank's for your reply, I tried using 'playgroup' but function 'open' and 'close' does not appear to be a valid AnimGroup as GECK rejects the script.

     

    I found a work around by activating the activator upon activation of the activator and then activating the activator again upon opening the container to complete the animation cycle. I also had utilize a timer to prevent the container opening before the 'open' animation had completed.

     

    The only problem was the activation sound was duplicated due to there being two references with the same model activating at the same time, so the moved the second reference (the primary container) to a cell not accessible to the player.

     

    It's a long work around to get an activator to function the same a container but it replicates it behavior perfectly.

     

    This is a dynamic container that calls the contents of multiple containers upon opening and then restores the previous state of the containers upon closing, I will include the script for anyone that may be interested.

    ScriptName MHSCPTFirstAidKitActivator00
    
    int FirstAidKit
    int MHREFRFirstAidKitActivator00Activated
    float MHREFRFirstAidKitActivator00Timer
    
    Begin OnActivate
    
    	MHREFRFirstAidKitActivator00.Activate
    	set MHREFRFirstAidKitActivator00Activated to 1
    
    End
    
    
    Begin GameMode
    
    	if MHREFRFirstAidKitActivator00Activated == 1
    		if MHREFRFirstAidKitActivator00Timer > 0.37
    			set MHREFRFirstAidKitActivator00Timer to 0
    			set MHREFRFirstAidKitActivator00Activated to 0
    			MHREFRFirstAidKit01.RemoveAllItems MHREFRFirstAidKitContainer00
    			MHREFRFirstAidKit02.RemoveAllItems MHREFRFirstAidKitContainer00
    			MHREFRFirstAidKit03.RemoveAllItems MHREFRFirstAidKitContainer00
    			MHREFRFirstAidKitContainer00.Activate Player
    		else
    			set MHREFRFirstAidKitActivator00Timer to MHREFRFirstAidKitActivator00Timer + GetSecondsPassed
    		endif
    	endif
    
    End
    
    
    Begin OnOpen
    
    	MHREFRFirstAidKitActivator00.Activate
    
    End
    
    
    Begin OnClose
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Radaway
    	MHREFRFirstAidKitContainer00.RemoveItem Radaway FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem Radaway FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount RadX
    	MHREFRFirstAidKitContainer00.RemoveItem RadX FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem RadX FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Stimpak
    	MHREFRFirstAidKitContainer00.RemoveItem Stimpak FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem Stimpak FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Morphine
    	MHREFRFirstAidKitContainer00.RemoveItem Morphine FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Morphine FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Buffout
    	MHREFRFirstAidKitContainer00.RemoveItem Buffout FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Buffout FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Jet
    	MHREFRFirstAidKitContainer00.RemoveItem Jet FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Jet FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Mentats
    	MHREFRFirstAidKitContainer00.RemoveItem Mentats FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Mentats FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS09UltraJet
    	MHREFRFirstAidKitContainer00.RemoveItem MS09UltraJet FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS09UltraJet FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat01
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat01 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat01 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat02
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat02 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat02 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat03
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat03 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat03 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Psycho
    	MHREFRFirstAidKitContainer00.RemoveItem Psycho FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Psycho FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Bloodpack
    	MHREFRFirstAidKitContainer00.RemoveItem Bloodpack FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem Bloodpack FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount CaveFungus
    	MHREFRFirstAidKitContainer00.RemoveItem CaveFungus FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem CaveFungus FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS04FireAntNectar
    	MHREFRFirstAidKitContainer00.RemoveItem MS04FireAntNectar FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem MS04FireAntNectar FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount AntNectar
    	MHREFRFirstAidKitContainer00.RemoveItem AntNectar FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem AntNectar FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount AntQueenPheromones
    	MHREFRFirstAidKitContainer00.RemoveItem AntQueenPheromones FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem AntQueenPheromones FirstAidKit 1
    
    End 
    
  2. Greetings FO3 community

     

    I am having some trouble getting an activator animation to work, The activator opens a first aid container with the same model as the activator; that being the default first aid model.

     

    The problem is the animation dosen't play on the activator as is would on the container.

     

    I would like to get the activator to play the same animation as the container when opening and closing.

     

    Upon Activate: Open animation

    Upon Deactivate: Close animation

    ScriptName MHSCPTFirstAidKitActivator00
    
    Begin OnActivate
    
    	MHREFRFirstAidKitContainer00.Activate Player 0
    
    End
    
    

    There is also a script attached to the container

    ScriptName MHSCPTFirstAidKitContainer00
    
    int FirstAidKit
    
    Begin OnOpen
    
    	MHREFRFirstAidKit01.RemoveAllItems MHREFRFirstAidKitContainer00
    	MHREFRFirstAidKit02.RemoveAllItems MHREFRFirstAidKitContainer00
    	MHREFRFirstAidKit03.RemoveAllItems MHREFRFirstAidKitContainer00
    
    End
    
    Begin OnClose
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Radaway
    	MHREFRFirstAidKitContainer00.RemoveItem Radaway FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem Radaway FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount RadX
    	MHREFRFirstAidKitContainer00.RemoveItem RadX FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem RadX FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Stimpak
    	MHREFRFirstAidKitContainer00.RemoveItem Stimpak FirstAidKit 1
    	MHREFRFirstAidKit01.AddItem Stimpak FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Morphine
    	MHREFRFirstAidKitContainer00.RemoveItem Morphine FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Morphine FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Buffout
    	MHREFRFirstAidKitContainer00.RemoveItem Buffout FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Buffout FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Jet
    	MHREFRFirstAidKitContainer00.RemoveItem Jet FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Jet FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Mentats
    	MHREFRFirstAidKitContainer00.RemoveItem Mentats FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Mentats FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS09UltraJet
    	MHREFRFirstAidKitContainer00.RemoveItem MS09UltraJet FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS09UltraJet FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat01
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat01 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat01 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat02
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat02 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat02 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS15Mentat03
    	MHREFRFirstAidKitContainer00.RemoveItem MS15Mentat03 FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem MS15Mentat03 FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Psycho
    	MHREFRFirstAidKitContainer00.RemoveItem Psycho FirstAidKit 1
    	MHREFRFirstAidKit02.AddItem Psycho FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount Bloodpack
    	MHREFRFirstAidKitContainer00.RemoveItem Bloodpack FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem Bloodpack FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount CaveFungus
    	MHREFRFirstAidKitContainer00.RemoveItem CaveFungus FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem CaveFungus FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount MS04FireAntNectar
    	MHREFRFirstAidKitContainer00.RemoveItem MS04FireAntNectar FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem MS04FireAntNectar FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount AntNectar
    	MHREFRFirstAidKitContainer00.RemoveItem AntNectar FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem AntNectar FirstAidKit 1
    
    	set FirstAidKit to MHREFRFirstAidKitContainer00.GetItemCount AntQueenPheromones
    	MHREFRFirstAidKitContainer00.RemoveItem AntQueenPheromones FirstAidKit 1
    	MHREFRFirstAidKit03.AddItem AntQueenPheromones FirstAidKit 1
    
    End
    

    Any help would be much appreciated

  3. Hey man,

     

    Just seen your topic.. don't know if your still working on this project but if you are,

     

    May i suggest..

     

    1. Load up the .esm file you would like to modify into the GECK

     

    2. Before making ANY changes, press the save button in the GECK

     

    3. Name your new save file in accordance to the .esm file (Master file), Eg. ZetaPlugIn.esp

     

    4. Exit the GECK

     

    5. Load your new save file (ZetaPlugIn.esp) in to the GECK and select "Set as Active File"

     

    6. Make your desired changes

     

    7. Don't forget to load your new save file (ZetaPlugIn.esp) into the game.. to do this Open "Fallout Mod Manager (FOMM)" and make sure the check-box is checked next to your new save file (ZetaPlugIn.esp)

     

    When you save a ESM (Master File) with the GECK it will save it as a ESP (Plug-in File)

    initially this file will be empty but the GECK will flag the ESP file with a Master (In this case the master file will be Zeta.esm)

     

    Any changes you make in the ESP file will override the values in the master file.. So you should never have to directly modify a master file.

     

    FO3Edit is a great tool and it allows you to View, Modify and Compare a Plug-In file with a Master file ... Very useful,

    However most modding is done in the GECK.

  4. Greetings,

     

    I am currently working on a plug-in for a mod, and I'm having quite a bit of trouble getting one of the most simplistic components to work.

     

    Scripting in terminals..

    For some reason scripts seem to behave differently in terminals,

     

    This is what i want the script to do..

     

    Stage 1: Display a 'Message Box' (when 'Item Text' is selected vir a 'Sub-Menu in a 'Terminal') with a Yes and No button.

     

    Stage 2: If Yes is selected; Remove all Items from a container (If No is selected; Do nothing)

     

    Sounds simple right? I just can't get it to work, maybe someone can guide me in the right direction.

     

    Script as follows.. (This is a 'Item Result Script', so no 'GameBlocks' are required to my knowledge)

    ______________________________________________________________________________________

    Short buttonVar

    showmessage TerminalMessage01

    set buttonVar to getbuttonpressed

    if buttonVar == 0
    TerminalContainer.removeallitems
    elseif buttonVar == 1
    ; Do nothing
    endIf

    ______________________________________________________________________________________

  5. It works (: Thanks to some advice courtesy of uhmattbravo

     

    I still don't understand why i can only set a variable once in a terminal script, however this is no longer relevant.

     

    Solution...

     

    Scn TerminalSubMenu1SCRI

    If getStage TerminalSubMenu1QUES == 20
    ShowMessage TerminalMessage02
    endIf

    If getStage TerminalSubMenu1QUES < 10
    SetStage TerminalSubMenu1QUES 10
    endIf

    If getStage TerminalSubMenu1QUES == 10
    ShowMessage TerminalMessage01
    SetStage TerminalSubMenu1QUES 20
    endIf

     

    Cheers for your input FrankFamily (:

  6. Legend!

     

    Using Quest Stages to store variables works like a charm.

     

    I still don't understand why i can only set a variable once in a terminal script, however this is no longer relevant.

     

    Solution...

     

    Scn TerminalSubMenu1SCRI

    If getStage TerminalSubMenu1QUES == 20
    ShowMessage TerminalMessage02
    endIf

    If getStage TerminalSubMenu1QUES < 10
    SetStage TerminalSubMenu1QUES 10
    endIf

    If getStage TerminalSubMenu1QUES == 10
    ShowMessage TerminalMessage01
    SetStage TerminalSubMenu1QUES 20
    endIf

     

    Thanks a million uhmattbravo

  7. Doesn't seem to work without the additional 1, In fact i think the only reason it dose work with the additional 1 is because the script is only valid unto DoOnce is set to 1 1.. After that nothing else runs before or after the "Set DoOnce 1 1" Command

     

    I'm not using any GameBlocks maybe that has something to do with it?

     

    The reason why I'm not using another terminal menu instead of a message box, is because i cant Set a DoOnce variable to a 'Terminal Menu Item'

  8. Okay so i got the First Part to work.. Having trouble with the Second Part.

     

    Not sure what effect this has but it's seems to fix the initial problem:

     

    Set DoOnce to 1 1

    ; or

    Set DoOnce to 1 DoOnce

    ________________________________________________________________________________________________________________

     

    ; So...

    Set DoOnce to 1 DoOnce

    ; or

    Set DoOnce to 1 1

    ; Returns the value of 1 meaning 'TRUE'

    ________________________________________________________________________________________________________________

     

    ; So... That means..

    Set DoOnce to 1 DoOnce

    ; or

    Set DoOnce to 1 1

    ; Equals

    Set DoOnce to 1 "TRUE'

     

    Hope this helps for anyone else that runs into this problem.

    ________________________________________________________________________________________________________________

     

    Now for the Second Part of my Script.. Need some help.

     

    I'm trying to show a Different message after 'DoOnce' has been set to "TRUE"

    Having trouble however..

    ________________________________________________________________________________________________________________

    ; First Part

     

    Short DoOnce

    If DoOnce == 0
    ShowMessage TerminalMessage01
    Set DoOnce to 1 1
    endIf

    ; Second Part

    If DoOnce == 1
    ShowMessage TerminalMessage02
    endIf

    ________________________________________________________________________________________________________________

  9. Okay so i got the First Part to work.. Having trouble with the Second Part.

     

    Not sure what effect this has but it's seems to fix the initial problem:

     

    Set DoOnce to 1 1

    ; or

    Set DoOnce to 1 DoOnce

    ________________________________________________________________________________________________________________

     

    ; So...

    Set DoOnce to 1 DoOnce

    ; or

     

    Set DoOnce to 1 1

    ; Returns the value of 1 meaning 'TRUE'

    ________________________________________________________________________________________________________________

     

    ; So... That means..

    Set DoOnce to 1 DoOnce

    ; or

    Set DoOnce to 1 1

    ; Equals

    Set DoOnce to 1 "TRUE'

     

    Hope this helps for anyone else that runs into this problem.

    ________________________________________________________________________________________________________________

     

    Now for the Second Part of my Script.. Need some help.

     

    I'm trying to show a Different message after 'DoOnce' has been set to "TRUE"

    Having trouble however..

    ________________________________________________________________________________________________________________

    ; First Part

     

    Short DoOnce

    If DoOnce == 0
    ShowMessage TerminalMessage01
    Set DoOnce to 1 1
    endIf

    ; Second Part

    If DoOnce == 1
    ShowMessage TerminalMessage02
    endIf

    ________________________________________________________________________________________________________________

  10. Hey guys,

     

    I'm doing some scripting in Fallout 3 for a mod I'm creating and I have run into some trouble.

     

    The script is for a "Terminal Sub-Menu - Menu Item" and is attached vir the 'Item result script' window found in the GECK 'Terminal' window.

     

    A quick run down on this scrips purpose..

     

    When i activate the target terminal i select a Menu Item which takes me to a Sub-Menu, Within that Sub-Menu i can select a Menu Item (of which the script is attached) which will run the script and open a 'Message Box' with a Yes and No button,

     

    However i only want this 'Message Box' to be displayed once (only the first time i select this 'Menu Item'), the next time i select the same 'Menu Item' i want in to do something different.

     

     

    Short DoOnce

    If ( DoOnce == 0 )
    ShowMessage TerminalMessage01
    Set DoOnce to 1
    endIf

    ; Stop Script here.

    ; Continue Script here next time the script runs.

    If ( DoOnce == 1 )
    ; Do something different.
    endIf

     

     

    The problem is i cant get the "ShowOnce" Variable to work

    I can set "ShowOnce" to "1" before showing the 'Message Box' but for some reason i cant set it to "1" after showing the 'Message Box'.

     

    If anyone can help me with this script i would greatly appreciate it.

  11. Hey guys,

     

    I'm doing some scripting in Fallout 3 for a mod I'm creating and I have run into some trouble.

     

    The script is for a "Terminal Sub-Menu - Menu Item" and is attached vir the 'Item result script' window found in the GECK 'Terminal' window.

     

    A quick run down on this scrips purpose..

     

    When i activate the target terminal i select a Menu Item which takes me to a Sub-Menu, Within that Sub-Menu i can select a Menu Item (of which the script is attached) which will run the script and open a 'Message Box' with a Yes and No button,

     

    However i only want this 'Message Box' to be displayed once (only the first time i select this 'Menu Item'), the next time i select the same 'Menu Item' i want in to do something different.

     

     

    Short DoOnce

    If ( DoOnce == 0 )
    ShowMessage TerminalMessage01
    Set DoOnce to 1
    endIf

    ; Stop Script here.

    ; Continue Script here next time the script runs.

    If ( DoOnce == 1 )
    ; Do something different.
    endIf

     

     

    The problem is i cant get the "ShowOnce" Variable to work

    I can set "ShowOnce" to "1" before showing the 'Message Box' but for some reason i cant set it to "1" after showing the 'Message Box'.

     

    If anyone can help me with this script i would greatly appreciate it.

×
×
  • Create New...