FuzeTek Posted January 8, 2011 Share Posted January 8, 2011 Hey guys, Ive been messing with this for hours, check the Bethsoft useful scripts and searched the forums and I cant find anything that gives me what I want. Basically I'm making an airlock, where you open the door, walk in and push a button. the door behind you closes, it enables steam jets for 10 seconds then disables them and set the door in front of you to openstate 1. If anybody could please help me with this I would greatly appreciate it. Here's the Script I'm currently using ScriptName Bio2DeconTest01float timer begin onactivateactivateset timer to 3 if timer < 1; elseif Timer < 2;After One second, do the followingLabDeconSprayREF01.enableLabDeconSprayREF02.enableLabDeconSprayREF03.enableLabDeconSprayREF04.enableLabDeconSprayREF05.enableLabDeconSprayREF06.enableDeconDoorREF01.SetOpenState 0elseif timer >15;donothing Endif if Timer < 15 LabDeconSprayREF01.disableLabDeconSprayREF02.disableLabDeconSprayREF03.disableLabDeconSprayREF04.disableLabDeconSprayREF05.disableLabDeconSprayREF06.disableDeconDoorREF02.SetOpenState 1 EndifEnd Link to comment Share on other sites More sharing options...
Death01 Posted January 8, 2011 Share Posted January 8, 2011 (edited) Try this script. I may not work exactly like you want straight out of the box, but it should get you started. Scriptname Bio2DeconTestA ;I hope this works for you, you may have to play with it;a little to get it just right---Death01. ;This is a object script;Use this script on the switch activator, and make sure;both doors have "Persistant Reference" checked. ;Effects references used here are checked as;"Persistant Reference" and "Intially Disabled". float showertimeshort shutoff ;-------------GameMode Block START ;You need to run the timer in a game mode block and;use the getsecondspassed function to count down.;The shutoff short is used like a flip-flop to shut/open doors;and turn effects on and off checking. Begin GameMode if shutoff == 1 if showertime > 0 set showertime to showertime - getSecondsPassed elseif GetOpenState == 1 ; if shower still on SetOpenState 0 ; shutoff the shower LabDeconSprayREF01.disable LabDeconSprayREF02.disable LabDeconSprayREF03.disable LabDeconSprayREF04.disable LabDeconSprayREF05.disable LabDeconSprayREF06.disable DeconDoorREF02.SetOpenState 1 set shutoff to 0 endif endifEnd ;-------------GameMode Block STOP ;-------------OnActivate Block START ;activator section of script;plus the set statement for the timer Begin OnActivate if (GetOpenState == 1 || GetOpenState == 3) ;checks state of switch if GetOpenState == 3 set showertime to 10 set shutoff to 1 DeconDoorREF01.SetOpenState 0 DeconDoorREF02.SetOpenState 0 LabDeconSprayREF01.enable LabDeconSprayREF02.enable LabDeconSprayREF03.enable LabDeconSprayREF04.enable LabDeconSprayREF05.enable LabDeconSprayREF06.enable Else LabDeconSprayREF01.disable LabDeconSprayREF02.disable LabDeconSprayREF03.disable LabDeconSprayREF04.disable LabDeconSprayREF05.disable LabDeconSprayREF06.disable DeconDoorREF02.SetOpenState 1 endif Activate endifEnd;-------------OnActivate Block STOP Edited January 9, 2011 by Death01 Link to comment Share on other sites More sharing options...
blove Posted January 8, 2011 Share Posted January 8, 2011 Take a look at this staged timer tutorial by Cipcis. Link to comment Share on other sites More sharing options...
FuzeTek Posted January 9, 2011 Author Share Posted January 9, 2011 @Death01Wow man this is way past my knowledge base. I tried it as is and it causes the activator button to do nothing at all. As of late this is the first script Ive ever tried that had timers or getopenstates. I have a headache : /Resident Evil 2 will be the death of me I swear. Link to comment Share on other sites More sharing options...
Death01 Posted January 9, 2011 Share Posted January 9, 2011 (edited) At least the doors should have opened and closed correctly....it was the effects I wasuncertain about. Two lines in the script didn't work...i took them out and made a short mod for testing. No great bells or whistles, it just does what you wanted in the simplest terms.You can load it up in the CS and pick at the esp at your own pace, and see justhow things were done. Pay close attention to the reference flags set on the doors and the spray FX. I've included the mod esp as an attachment. To use it: 1.download/extract it and put it in your fallout 3 data folder.2. put a check by "biodecontest" in data files.3. load your game. hit the tithe key to bring up console, and type coc biodecon 4.hit enter Study the link blove posted, and here's a couple more: http://modsreloaded.com/fallout3-modding-guide-t670.htmlhttp://geck.bethsoft.com/index.php/Help:Welcome_to_the_Wikihttp://cs.elderscrolls.com/constwiki/index.php/Main_Page Yeah, i know the last one's a TES4 link, but most of the scripting is the same,and Oblivion's been around for a lot longer, so there's more info in some cases. And above all, take 2 aspirin, and DON'T PANIC. :thumbsup: Attachment: Edited January 9, 2011 by Death01 Link to comment Share on other sites More sharing options...
FuzeTek Posted January 9, 2011 Author Share Posted January 9, 2011 Hey, It works perfectly, I am extremely Happy. thank you very much, I'm adding you to my Credits for sure.Be sure to check out the status of my mod if your a Resident Evil fan. I've taken Excedrin Migraine, I'm calm ^_^ I find scripting a lot more difficult than learning 3d Modeling Thanx again for the help and the links! Link to comment Share on other sites More sharing options...
Quadratomic Posted January 9, 2011 Share Posted January 9, 2011 (edited) Hello. I just wanted to take the time to extend my thanks to the both of you, as you've both helped answer a few questions I've had regarding timer scripts. Now I don't mean to take over this topic with my own questions, but how could you remove rads through the use of a script? This is all nice aesthetically, but actually removing rads would be a benefit as well. - Quadratomic Edit: Never mind. I wasn't thinking too clearly when I typed that out. Just went into the My First Infirmary script and found it: "player.RestoreAV RadiationRads 1000000" Edited January 9, 2011 by Quadratomic Link to comment Share on other sites More sharing options...
Death01 Posted January 9, 2011 Share Posted January 9, 2011 (edited) just BEFORE the "Else" in the OnActivate Block, add these to lines for removing rads; player.RestoreAV RadiationRads 1000000 Showmessage HD00InfirmaryRadsMessage oh, BTW, anyone who wants to use the script or mod i've posted, don't bother mewith asking, just take it! :yes: Edited January 9, 2011 by Death01 Link to comment Share on other sites More sharing options...
Recommended Posts