Deleted2746547User Posted October 11, 2012 Share Posted October 11, 2012 (edited) Here's one I could use a little feedback on: I know it's ugly, so are my scripting skills though. scn BlackbriarWASHOERFATowerBuildScript short button begin OnActivate if IsActionRef player ShowMessage BlackbriarRFAWashoeTowerChoiceMesg; option menu message endif end begin MenuMode 1001 set Button to GetButtonPressed if ( Button == 0 ) If Player.GetItemCount BlackbriarHammer >= 1 && doOnce == 0 && player.GetItemCount BlackbriarMetalResource >= 10 && player.GetItemCount BlackbriarResourceWood >= 3 ; items you will need to activate object player.removeitem BlackbriarMetalResource 10; removes items if you have everything player.removeitem BlackbriarResourceWood 3 BlackbriarTowerBuildRef.enable; enables x marker that enables radio free america tower BlackbriarRadioFreeAmericaTowerAct.disable; removes the anvil activator item from area BlackbriarRadioFreeAmericaTowerAct.markfordelete; removes anvil from memory Else ShowMessage BlackbriarWashoeRFABuildingMaterialsMsg; Endif if (button ==1) End if End The purpose is to pop up a menu when you go to activate an object. The option menu (MESG) tells you what you are trying to activate, what you need (requirements) and gives you two choices. #1 Activate - which then checks to make sure you have the required supplies. If you do, it activates the object and disables the item you used to activate it. If you fail the necessary items check, it gives you a message that says you don;t have enough, come back when you do. And option #2 is cancel and come back another day. Ideas? Edited October 11, 2012 by Guest Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 11, 2012 Author Share Posted October 11, 2012 No thoughts? Link to comment Share on other sites More sharing options...
Mishaxhi Posted October 11, 2012 Share Posted October 11, 2012 What problems are you having? Simply not working or is it not compiling when you try and save it? Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) What problems are you having? Simply not working or is it not compiling when you try and save it? It won't compile. :/ And I've tried tweaking it left and right but there is something I must be missing in the syntax or set up. I'm trying to get this to replace my current script - because it doesn't give you the option menu before trying to take your stuff. And since there are a lot of activators that will use this script... I'd like to get it right! ::) Edited October 11, 2012 by Guest Link to comment Share on other sites More sharing options...
Mishaxhi Posted October 11, 2012 Share Posted October 11, 2012 Cleaned up the syntax as best I could, don't know if it'll do you any good. scn BlackbriarWASHOERFATowerBuildScript short button short doOnce begin OnActivate if IsActionRef player == 1 ShowMessage BlackbriarRFAWashoeTowerChoiceMesg endif end begin MenuMode 1001 set Button to GetButtonPressed if ( Button == 0 ) If Player.GetItemCount BlackbriarHammer >= 1 && doOnce == 0 && player.GetItemCount BlackbriarMetalResource >= 10 && player.GetItemCount BlackbriarResourceWood >= 3 player.removeitem BlackbriarMetalResource 10 player.removeitem BlackbriarResourceWood 3 BlackbriarTowerBuildRef.enable; enables x marker to build radio free america tower BlackbriarRadioFreeAmericaTowerAct.disable; removes the anvil build base activator item from area BlackbriarRadioFreeAmericaTowerAct.markfordelete Else ShowMessage BlackbriarWashoeRFABuildingMaterialsMsg Endif (button == 1) Endif End Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 11, 2012 Author Share Posted October 11, 2012 Thanks for taking the time on that. It still doesn't work and that's frustrating. I have all the messages in place and all the item names are correct. I don't get why i can't make a simple option menu activator work right!! Cleaned up the syntax as best I could, don't know if it'll do you any good. scn BlackbriarWASHOERFATowerBuildScript short button short doOnce begin OnActivate if IsActionRef player == 1 ShowMessage BlackbriarRFAWashoeTowerChoiceMesg endif end begin MenuMode 1001 set Button to GetButtonPressed if ( Button == 0 ) If Player.GetItemCount BlackbriarHammer >= 1 && doOnce == 0 && player.GetItemCount BlackbriarMetalResource >= 10 && player.GetItemCount BlackbriarResourceWood >= 3 player.removeitem BlackbriarMetalResource 10 player.removeitem BlackbriarResourceWood 3 BlackbriarTowerBuildRef.enable; enables x marker to build radio free america tower BlackbriarRadioFreeAmericaTowerAct.disable; removes the anvil build base activator item from area BlackbriarRadioFreeAmericaTowerAct.markfordelete Else ShowMessage BlackbriarWashoeRFABuildingMaterialsMsg Endif (button == 1) Endif End Link to comment Share on other sites More sharing options...
devinpatterson Posted October 11, 2012 Share Posted October 11, 2012 You'v got powerup installed now right? Run it and save yourself a ton of hassle. Let's see what line(s) the compiler is choking on. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) --updated--- Edited October 12, 2012 by Guest Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) --updated-- Edited October 12, 2012 by Guest Link to comment Share on other sites More sharing options...
Mishaxhi Posted October 11, 2012 Share Posted October 11, 2012 I thought that line looked a little funny, but didn't know what you were trying to do with it. Link to comment Share on other sites More sharing options...
Recommended Posts