virxas Posted August 6, 2009 Share Posted August 6, 2009 I'm trying to script a jukebox so that when you activate it, it gives you a choice of what station you want to set it to. Although I'd like to eventually give the script the functionality to check to see if you have the station in your pip-boy before offering it as an option, I'll hold that off until I get it so that I can change the station between static options. Currently, whenever you activate it, it brings up a message window telling you to select a station, giving you the options of "Off", "Galaxy News Radio", and "Enclave Radio". You can select one of the options, which currently do nothing, and it's here that I'm stuck, since I'm not sure exactly how this works(I used Timebomb's script as a reference, and hope I at least am in the right direction so far) and I don't know what attribute I'm setting on the jukebox. Here's my script so far: "scn CrazyChangeJukeboxScript short JukeboxActivate Begin OnActivate ShowMessage CrazyChangeJukeboxMessage set JukeboxActivate to GetButtonPressed End Begin gamemode if ( JukeboxActivate == 0 ) ;CrazyChangeJukebox.??off?? elseif ( JukeboxActivate == 1 ) ;CrazyChangeJukebox.??gnr?? elseif ( JukeboxActivate == 2 ) ;CrazyChangeJukebox.??enclave?? endif End" And the message is titled, "Jukebox", with the text, "Select a station", and the buttons, "Off", "Galaxy News Radio", and "Enclave Radio" as buttons 0, 1, and 2 respectively. Any help is appreciated. Link to comment Share on other sites More sharing options...
Interfer0 Posted August 7, 2009 Share Posted August 7, 2009 I could be wrong, but aren't there you just already jukeboxes in the game, couldn't you just grab the script from there and modify it for your uses? Link to comment Share on other sites More sharing options...
Cipscis Posted August 7, 2009 Share Posted August 7, 2009 @Interfer0:The default activation of vanilla jukeboxes is hard-coded, and is not controlled by a script. @virxas:Your script won't work at the moment due to the way in which you've used GetButtonPressed. I've written a tutorial that details the scripting behind menus that use ShowMessage and GetButtonPressed which you might find useful - Making a Menu When it comes to checking whether or not the player currently "has" a radio station, I don't believe there is a specific function that can be used for this. However, you might be able to have a look at "Reneer's Radio Mod" in order to see how he did it:Reneers Radio Mod 0.93 by Reneer @ Fallout 3 Nexus: http://www.fallout3nexus.com/downloads/file.php?id=4709 P.S. Please use "code" or "codebox" tags when posting code, as this makes it easier to read by forcing it to be displayed in a fixed-width font and maintains indentation. If you don't know how to indent your scripts, here is a web-based tool that can do it for you, as well as check if for various structural errors - Script Validator Cipscis Link to comment Share on other sites More sharing options...
virxas Posted August 9, 2009 Author Share Posted August 9, 2009 Actually, Reneer's Radio Mod basically does everything I wanted to already, so there's no need for me to reinvent the wheel. And your page is useful and has a lot of good info in it, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts