senterpat Posted January 22, 2014 Share Posted January 22, 2014 Can somebody please tell me why this script isn't functioning as intended? I don't have much experience with menu options and would greatly appreciate it.The script is functioning on the first block, but in game it doesn't even seem to register the buttons being pressed. Thanks for any help. scn patPipeScript int iButtonIndex int iPageNumber begin scripteffectstart player.additem patpipe 1 1 ShowMessage patpipeMessage Set iPageNumber to 1 end begin GameMode if ipagenumber == 1 Set iButtonIndex to GetButtonPressed if iButtonIndex == 0 player.cios pattobaccopipe playsound cigarettelighter player.removeitem pattobacco 1 1 set ipagenumber to 0 elseif iButtonIndex == 1 player.cios patpcppipe playsound cigarettelighter player.removeitem patpcp 1 1 set ipagenumber to 2 elseif iButtonIndex == 3 player.cios patmarijuanapipe playsound cigarettelighter player.removeitem patmarijuana 1 1 set ipagenumber to 2 elseif iButtonIndex == 4 player.cios patheroinpipe playsound cigarettelighter player.removeitem patheroin 1 1 set ipagenumber to 2 elseif iButtonIndex == 5 player.cios patamphetaminepipe playsound cigarettelighter player.removeitem patamphetamine 1 1 set ipagenumber to 2 elseif iButtonIndex == 6 ;do nothing endif endif end Link to comment Share on other sites More sharing options...
jazzisparis Posted January 22, 2014 Share Posted January 22, 2014 The GameMode block type is not processed and will not work in Effect-type scripts. ScriptEffectUpdate (instead of GameMode) might work, though I somewhat doubt that - nonetheless, it would be interesting to try.The "conventional" way of doing it is by adding a token item that is running an Object-type script with OnAdd + GameMode blocks (just remember to call RemoveMe once the menu is exited). Link to comment Share on other sites More sharing options...
senterpat Posted January 22, 2014 Author Share Posted January 22, 2014 Thank you! Didn't work with scripteffectupdate, I'd already tried that. But the token version is working just fine. Do you know of anyway to make the token script run with the pipboy open? Thanks again. :D Link to comment Share on other sites More sharing options...
jazzisparis Posted January 22, 2014 Share Posted January 22, 2014 Do you know of anyway to make the token script run with the pipboy open?Yep, simply replace GameMode with MenuMode. That's all. Link to comment Share on other sites More sharing options...
senterpat Posted January 22, 2014 Author Share Posted January 22, 2014 Works perfectly, thank you so much. Kudos Link to comment Share on other sites More sharing options...
irswat Posted May 11, 2014 Share Posted May 11, 2014 thank you! Link to comment Share on other sites More sharing options...
Recommended Posts