danatoth666 Posted February 14, 2012 Author Share Posted February 14, 2012 If anyone would like an example of what I'm trying to do, head over to the quest "BQ01"This quest gives the player a bounty note. Link to comment Share on other sites More sharing options...
gsmanners Posted February 14, 2012 Share Posted February 14, 2012 Ah. I guess that would explain the problem. What you're looking at is one of those Radiant quests that (I think) uses keywords to supply references and such. Probably not what you wanted. I was working from DA02Script myself. Link to comment Share on other sites More sharing options...
danatoth666 Posted February 14, 2012 Author Share Posted February 14, 2012 Ah. I guess that would explain the problem. What you're looking at is one of those Radiant quests that (I think) uses keywords to supply references and such. Probably not what you wanted. I was working from DA02Script myself. I wasn't trying to do a Radiant quest it was just the only reference to giving an item I could find. Now that I'm looking at DAO2 I'm noticing this line: PlayerRef .AddItem(kmyquest.DA02Dagger) What is the "kmyquest" exactly? Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 It's either a variable, a property, or the parameter of a function in which that line of code resides. Can you see it declared as a variable or property elsewhere in the script? Cipscis Link to comment Share on other sites More sharing options...
Mansh00ter Posted February 14, 2012 Share Posted February 14, 2012 For some reason, I find that the only way to get properties working correctly in the scripts, is to add them via CK, not directly into code. The CK adds the same line of code I would add, but I think it also associates the property with the correct object, which does not happen if you just type something like "GlobalVariable Property MyVariable Auto" in the script. So if you have set up your object and want to declare a property for it in the script, try using the CK interface to do it, and make sure that you have picked your object for that property once it's created. Link to comment Share on other sites More sharing options...
thesuperkuif Posted January 25, 2014 Share Posted January 25, 2014 I still havent figured this out. I just want the npc to take 2000 gold from me and give me the key. Seems simple but for me it isnt :( Link to comment Share on other sites More sharing options...
rjhelms84 Posted February 1, 2014 Share Posted February 1, 2014 (edited) Lol, this thread is mad funny. Forget about alias's and all that stuff. Just go onto the quest stages tab of your quest, click onto the stage you want to add the gold, and add a new property to the script fragment there, of the type "miscitem" and call it Gold001, and then use autofill, and it will fill it automatically. Then back in the script just type this: Game.GetPlayer().Additem(Gold001, 2000) Edited February 1, 2014 by rjhelms84 Link to comment Share on other sites More sharing options...
rjhelms84 Posted February 1, 2014 Share Posted February 1, 2014 For some reason, I find that the only way to get properties working correctly in the scripts, is to add them via CK, not directly into code. The CK adds the same line of code I would add, but I think it also associates the property with the correct object, which does not happen if you just type something like "GlobalVariable Property MyVariable Auto" in the script. So if you have set up your object and want to declare a property for it in the script, try using the CK interface to do it, and make sure that you have picked your object for that property once it's created. You can write it yourself in the script, but you still need to set what the property points to in the properties window. Link to comment Share on other sites More sharing options...
icecreamassassin Posted April 15, 2014 Share Posted April 15, 2014 (edited) Basically the way you have to look at Papyrus is this: Papyrus knows NOTHING about what anything in the game is. You basically have to use variable properties to define everything, which in full form scripts means to define your items before the rest of your code ex: ObjectReference Propery BIGASSSWORD Auto I like to make my properties all caps so they stand out to me in the code. Then you tell it what you want to do with BIGASSSWORD and save the script, then you have the "property" button where you actually get to tell papyrus WHAT that BIGASSSWORD refers to... In quest and dialog it's trickier because you have to go through alias' for everything. You need an alias container OR NPC and you need an alias for the item you want to give. You then tell the item alias to generate a reference inside of the container or the NPC when the quest starts (i'ts fairly easy on the alias page to figure that out), then you slap the script fragment in that adds the item to the player (the standard Game.GetPlayer...etc etc Call) and the alias is where you want to take it from. It's kinda confusing and a big pain in the butt to set up, especially for one off things, but the new system is vastly more versatile for handling things with generic functions instead of custom code for every task. I'm still learning it all myself, but I'm starting to get back to my old Oblivion proficiency :smile: Edited April 15, 2014 by icecreamassassin Link to comment Share on other sites More sharing options...
Recommended Posts