RuaDragonheart Posted July 14, 2012 Share Posted July 14, 2012 So I'm trying to get a button toggle script to work, but the GECK refuses to even recognize the important part: the actual button press script. Every attempt at saving the script gives me a syntax error reading that it doesn't recognize the 'IsKeyPressed' line. Here's the script in question: scn aa3EFdrgnvgscript float timer; short refresh; begin GameMode if refresh == 0 if timer < .5 set timer to timer + GetSecondsPassed; else set timer to 0; set refresh to 1; endif else if IsKeyPressed == 87 if aadrgNVGmode == 0 set aadrgNVGmode to 1; else set aadrgNVGmode to 0; player.removespell, 3EFrcssEffectNVG endif set refresh to 0; endif endif end Can anyone tell me what I'm doing wrong? Link to comment Share on other sites More sharing options...
luthienanarion Posted July 14, 2012 Share Posted July 14, 2012 IsKeyPressed is an NVSE function, so you have to load the GECK with NVSE. Also, that line should read: if iskeypressed 87 The function requires an argument, and you're passing it an operator instead. Link to comment Share on other sites More sharing options...
RuaDragonheart Posted July 15, 2012 Author Share Posted July 15, 2012 So it doesn't load it automatically? Argh. How would I go about loading it with NVSE? And how should the script look? That's practically modeled after a FO3 mod that does the same, and it works fine in FO3 with FOSE. Link to comment Share on other sites More sharing options...
luthienanarion Posted July 15, 2012 Share Posted July 15, 2012 Change the target of your GECK shortcut to add -editor after the file path outside the quotation marks. "C:\Program Files (x86)\Steam\steamapps\common\fallout new vegas\nvse_loader.exe" -editor Link to comment Share on other sites More sharing options...
RuaDragonheart Posted July 15, 2012 Author Share Posted July 15, 2012 (edited) Hurrah. My button toggles now work. I just have one little issue I still need to iron out. The mod's set up so that it plays the stealth boy's sound effect and electrical field play/appear when the player crouches with the armor worn. How would I set it up so that it happens with the toggle instead?Script is thus: scn aa3EFdrgsscript float timer; short refresh; begin GameMode if refresh == 0 if timer < .5 set timer to timer + GetSecondsPassed; else set timer to 0; set refresh to 1; endif else if IsKeyPressed 88 if aadrgplatesf == 0 set aadrgplatesf to 1; else set aadrgplatesf to 0; endif set refresh to 0; endif endif endNot sure what to add to that, or what to remove from other scripts (there's like two others I copied over from the original FO3 mod, I'll post 'em if I need to) or from spell effects or whatever.EDIT: This is apparently the script handling the sfx and gfx for the cloaking, which is still attached to the sneak mode use. scn StealthCloak3NVEffect BEGIN SCRIPTEFFECTSTART PMS NightkinCloakFXShader 1 PlaySound3D RCSS3NVsound01 SMS NightkinCloakFXShader END BEGIN SCRIPTEFFECTFINISH PMS NightkinCloakFXShader 1 PlaySound3D RCSS3NVsound01 SMS NightkinCloakFXShader END Edited April 23, 2013 by RuaDragonheart Link to comment Share on other sites More sharing options...
RuaDragonheart Posted July 15, 2012 Author Share Posted July 15, 2012 Okay. Seems I didn't need to do any further tweaking--one of the actions of the enchantment controlling the sfx/gfx was set to a sneak check instead of a global value check. Changed that around and it works exactly how I want it to, so I'm pretty much good to go. Thanks again for your help, luthienanarion. Couldn't have gotten this far without your expertise. Link to comment Share on other sites More sharing options...
luthienanarion Posted July 15, 2012 Share Posted July 15, 2012 Okay. Seems I didn't need to do any further tweaking--one of the actions of the enchantment controlling the sfx/gfx was set to a sneak check instead of a global value check. Changed that around and it works exactly how I want it to, so I'm pretty much good to go. Thanks again for your help, luthienanarion. Couldn't have gotten this far without your expertise. No problem; scripting is what I do. Glad to hear you got it working like you wanted it to. Link to comment Share on other sites More sharing options...
Recommended Posts