JustAnotherModder93 Posted October 12, 2015 Share Posted October 12, 2015 Decided to try and run this again. Trying to make a safe that will use the Nipton Lottery tickets as a "key".I have made this: scn: NiptonLotteryScriptBegin GamemodeIf Player.GetItemCount NiptonLotteryTicket == 1 Unlock Player.RemoveItem NiptonLotteryTicket 1EndIfEnd However, if I hit the save button, nothing happens, so I assume it didn't work. I have run it in the Cipscis Script Validator, and that didn't pick up any problems at all. Link to comment Share on other sites More sharing options...
Ladez Posted October 13, 2015 Share Posted October 13, 2015 Remove the colon in the first line and it should save just fine. Link to comment Share on other sites More sharing options...
Testudini Posted October 13, 2015 Share Posted October 13, 2015 As Ladez said, remove the colon and you'll be fine. However, I do have to wonder if you're wanting to safe to unlock upon being activated. The way it works right now, the safe will unlock and take the player's ticket as soon as it loads, not as soon as it's activated. If you're wanting to have it unlock on being activated, use a script like this: scn NiptonLotteryScript Begin OnActivate ; The code will only activate if the player activates the safe and if the player has at least 1 ticket (always use >= when counting how much of an item a player has). if (IsActionRef == Player) && (Player.GetItemCount NiptonLotteryTicket >=1) Unlock Player.RemoveItem NiptonLotteryTicket 1 Activate ; If you don't put this here, activating the safe will only remove the ticket. endif end Of course, this script will remove a lottery ticket from the player EVERY TIME they activate the safe. I'll let you figure out how to get around that though. There's no better way to learn than to try something yourself :wink:. Link to comment Share on other sites More sharing options...
JustAnotherModder93 Posted October 13, 2015 Author Share Posted October 13, 2015 As Ladez said, remove the colon and you'll be fine. However, I do have to wonder if you're wanting to safe to unlock upon being activated. The way it works right now, the safe will unlock and take the player's ticket as soon as it loads, not as soon as it's activated. If you're wanting to have it unlock on being activated, use a script like this: scn NiptonLotteryScript Begin OnActivate ; The code will only activate if the player activates the safe and if the player has at least 1 ticket (always use >= when counting how much of an item a player has). if (IsActionRef == Player) && (Player.GetItemCount NiptonLotteryTicket >=1) Unlock Player.RemoveItem NiptonLotteryTicket 1 Activate ; If you don't put this here, activating the safe will only remove the ticket. endif end Of course, this script will remove a lottery ticket from the player EVERY TIME they activate the safe. I'll let you figure out how to get around that though. There's no better way to learn than to try something yourself :wink:.I tried what you said, still didn't save. Remove the colon in the first line and it should save just fine.Also tried this one, and completely nothing. If either of you reply with suggestions, I'd be grateful.Until then, I will assume that it's a bug with my GECK/FNV. Which is quite possible. Link to comment Share on other sites More sharing options...
Ladez Posted October 13, 2015 Share Posted October 13, 2015 I can only tell you that removing the colon lets me save the script, so you must be doing something wrong. Also, Testudini's script has a little error in it; it's IsActionRef Player and not IsActionRef == Player. It also lacks a semicolon for the second line of the comment, before 'ticket'. Can you walk us through the exact steps you take to save the script, all the way from starting up the GECK? Link to comment Share on other sites More sharing options...
Testudini Posted October 13, 2015 Share Posted October 13, 2015 I can only tell you that removing the colon lets me save the script, so you must be doing something wrong. Also, Testudini's script has a little error in it; it's IsActionRef Player and not IsActionRef == Player. It also lacks a semicolon for the second line of the comment, before 'ticket'. Can you walk us through the exact steps you take to save the script, all the way from starting up the GECK?That's what you get for trying to help when you're half-awake. :p I tried putting your script into the G.E.C.K. without the colon in the name and it worked just fine for me. Here's how it appears in my G.E.C.K.: https://i.gyazo.com/792b4737f76d34d9782ab3f671276102.png This may be a dumb question, but you haven't accidentally deleted the ticket from the G.E.C.K., have you? Link to comment Share on other sites More sharing options...
JustAnotherModder93 Posted October 14, 2015 Author Share Posted October 14, 2015 I can only tell you that removing the colon lets me save the script, so you must be doing something wrong. Also, Testudini's script has a little error in it; it's IsActionRef Player and not IsActionRef == Player. It also lacks a semicolon for the second line of the comment, before 'ticket'. Can you walk us through the exact steps you take to save the script, all the way from starting up the GECK? Simple.Open GECK,Open FalloutNV.esm and Nipton Lottery.esp (As it already has the safe made)Go to the safe and click EditClick the "..." button next to Scripts to open Script EditClick "Script", then "New..."Proceed to enter scriptClick the save button and watch as a whole lot of nothing happens I can only tell you that removing the colon lets me save the script, so you must be doing something wrong. Also, Testudini's script has a little error in it; it's IsActionRef Player and not IsActionRef == Player. It also lacks a semicolon for the second line of the comment, before 'ticket'. Can you walk us through the exact steps you take to save the script, all the way from starting up the GECK?That's what you get for trying to help when you're half-awake. :tongue: I tried putting your script into the G.E.C.K. without the colon in the name and it worked just fine for me. Here's how it appears in my G.E.C.K.: https://i.gyazo.com/792b4737f76d34d9782ab3f671276102.png This may be a dumb question, but you haven't accidentally deleted the ticket from the G.E.C.K., have you? Haven't deleted anything that I know of, so it's still probably my copy of the game/geck that's the problem. Here's a photo of the script in my geck PLEASE NOTE!!!!! There's a typo in it, which I changed, and it made no differencehttps://41.media.tumblr.com/e362321be8f7b7bb10646111adf76bb5/tumblr_nw7guzvRFW1s94u95o1_1280.jpg Link to comment Share on other sites More sharing options...
Ladez Posted October 14, 2015 Share Posted October 14, 2015 Clicking on the save button doesn't actually prompt any immediate response from the UI. The title of the script editor will still have the asterisk marking it as modified. But the script will be saved and hitting the X close the window will not prompt you to save as it will with an unused script. Please double-check that that you are in fact not saving the script. Link to comment Share on other sites More sharing options...
JustAnotherModder93 Posted October 14, 2015 Author Share Posted October 14, 2015 IT WORKS!!! I also added in a line of the same with for the valuable tickets, So the safe will probably take both if the player has them, but I don't really care. Maybe later I'll adjust it. Anyway, just a little more work to do, then it will be ready for testing.You two willing to lend your immensly appreciated help to that part as well? Link to comment Share on other sites More sharing options...
Recommended Posts