QuentinVance Posted May 5, 2016 Share Posted May 5, 2016 Hi there, guys!I've been working on a mod for some time now, and everything went okay while creating locations. Now, however, I want to do something more: I want to actually create something the player can interact with. In this case, I have a Terminal which, upon interaction, is supposed to recognize an holotape in the player's inventory and add a new option to display.I have little knowledge of coding, since I used to create small games, but surely I don't know anything about the GECK's code, and all I know comes from a few years ago so I'm a bit rusty. What I would do is simply write something like: if (player.has_item_holotape == 1){ //add option in the terminal } However I suspect this would not work in the G.E.C.K. so I need to know some functions and how to use them. I've tried searching the wiki but I believe that wouldn't be enough.So, is there anyone who can help me? I know it's pretty much like asking you to just do this for me (and it's always like this until one learns how to do it himself) but I actually want to learn. Link to comment Share on other sites More sharing options...
Jokerine Posted May 5, 2016 Share Posted May 5, 2016 If you have a terminal, that's pretty easy. You wouldn't even need a script :) You can add a display condition instead. So, I assume you have already set up a new entry on the terminal that displays a note, like so... http://i.imgur.com/tRbySQZ.png?1 So, in the "Item Conditions" area, right-click and select "New". In Condition Item, under Condition Function, look for GetHasNote. Then click Function Parameters and look for your note. Leave Comparison as = and Value 1. On "Run on", select Reference, click Select and look for "PlayerRef" under the Ref tab. Then click OK and you should have this. http://i.imgur.com/lOZdzHJ.png?1 Just click OK and you'll have this next. http://i.imgur.com/dVBnoUA.png?1 With this condition your entry will only appear if the player has the note. Nice and simple without scripts. Hope it helps :) Link to comment Share on other sites More sharing options...
QuentinVance Posted May 5, 2016 Author Share Posted May 5, 2016 Great, that's exactly what I needed! Just a thing: is it possible to have the same thing but checking if the player has an Item instead of a note? I was searching for something like "GetHasItem" but that doesn't seem to exist, so what's the function I'm looking for? Link to comment Share on other sites More sharing options...
Jokerine Posted May 5, 2016 Share Posted May 5, 2016 (edited) Yeah, just replace GetHasNote with GetItemCount :smile: EDIT: There is a list of conditions you can use here. Edited May 5, 2016 by Jokerine Link to comment Share on other sites More sharing options...
QuentinVance Posted May 5, 2016 Author Share Posted May 5, 2016 What if I want this option to appear if I have one of a series of items instead? I should check the "OR" checkbox and add a new condition in the same way, correct?If that's so, then I'm starting to understand how this works. Link to comment Share on other sites More sharing options...
Jokerine Posted May 5, 2016 Share Posted May 5, 2016 What do you mean by a series of items? OR is used to check if you have one or the other. So if you want the note to appear if the player either has 1 Nuka Cola or 2 Fission Batteries, you'd put in two conditions (GetItemCount NukaCola = 1 and GetItemCount FissionBattery = 2) and tag them both as OR. If you want the note to appear if the player has BOTH the Nuka and the two Batteries, you'd apply the same conditions but with both tagged as AND. Truth be told, I've always had a bit of trouble wrapping my head around OR, so I'd recommend you play around to see how it works. Good luck :) Link to comment Share on other sites More sharing options...
QuentinVance Posted May 5, 2016 Author Share Posted May 5, 2016 I wanted to go for the first option, checking if the player has one or the other. So yeah, I will try to have it work as I want it to.Thanks for the assistance, you've been very helpful! Link to comment Share on other sites More sharing options...
Jokerine Posted May 5, 2016 Share Posted May 5, 2016 Welcome bud. Good luck! :) Link to comment Share on other sites More sharing options...
Recommended Posts