3170728 Posted May 16, 2012 Share Posted May 16, 2012 So I made a Generator, which should be refueled by Turppentine. Here is my script : scn GeneratorFuel int iButton Begin OnActivate ShowMessage 00Generator End Begin GameMode set iButton to GetButtonPressed if iButton == -1 ; No button has been pressed yetReturnelseif iButton == 0 ; Option 0if player.GetItemCount Turpentine >= 3player.removeitem Turpentine 3 else showmessage 0NotenoughTurpentineendif elseif iButton == 1 ; Close Message WindowRemoveMe endif End The Problem is, that Fallout Isn't Caring if I have turpentine in my Inventory or not. I Can activate the Generator with and without the turpentine. When I have 3 Turpentine in my inventory, it gets removed by the script. What am I Doing wrong ? Link to comment Share on other sites More sharing options...
b3w4r3 Posted May 16, 2012 Share Posted May 16, 2012 I think else should be on its own line for one, with the showmessage function below it. And what's the removeme bit? That only works on inventory items, not activators. What happens if it is activated, is there some animation? Since there is no activate function anywhere in the script I don't see how it is getting activated. Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 16, 2012 Share Posted May 16, 2012 if (player.GetItemCount Turpentine >= 3) player.removeitem Turpentine 3else showmessage 0NotenoughTurpentineendif Would be my recommendation. Geck can be.. strange. Its best to stick very close to explicit syntax as you can. Also, Don't use 'removeme', Just don't do anything if its == 1. (You could also 'return' if there was code you wanted to skip) Link to comment Share on other sites More sharing options...
3170728 Posted May 16, 2012 Author Share Posted May 16, 2012 Thanks ! That was the small mistake I had overseen, it works like a Charm now ! Topic Can be closed Link to comment Share on other sites More sharing options...
Recommended Posts