666989 Posted October 29, 2014 Share Posted October 29, 2014 (edited) Ok, so I'm working on a mod. And I can't seem to get it working, New to scripting and don't know if I'm overlooking something.I have been working on the script but ran into an unknown error, when you drop the item after purchase upon interaction, typically you would pick it back up, it instead is supposed to allow you to rest/sleep. To pick it up you would first press Z + interaction button (E is default). So E-rest/sleep, Z+E-pick up item. But when you go to interact nothing happens, same with Z+interact.Here's a copy of the script so far: short droppedref markerbegin onaddif dropped == 1set dropped to 0endifendbegin ondropif dropped == 0set dropped to 1endifendbegin onactivateif isplayeractionactive 5 ; Z key object + E activateactivate ;pick up objectelse ; regular E activateref refName;make refname BedMattress01FloorRset refName to BedMattress01FloorRset refName to player.placeatme BedMattress01FloorR 1refName.moveto PlayerrefName.disablerefname.markfordeleteendifendif Edited October 29, 2014 by 666989 Link to comment Share on other sites More sharing options...
claustromaniac Posted November 11, 2014 Share Posted November 11, 2014 (edited) ref refName ;make refname BedMattress01FloorR set refName to BedMattress01FloorR set refName to player.placeatme BedMattress01FloorR 1 refName.moveto Player refName.disable refname.markfordelete endif endif I'm not a pro, not even close, but I noticed two things. The first line in red is not necessary at all, since you're setting that same variable to another value immediately after that, in the next line of the script. Secondly, I know you know this one: the block should end with an "end", not "endif". To help prevent those mistakes and even typos you should try a program like Notepad++ and a syntax highlighter for FO3, such as this one. You can also try this, or just look around, there are other useful alternatives out there. Edited November 11, 2014 by claustromaniac Link to comment Share on other sites More sharing options...
Recommended Posts