Caiman Posted February 14, 2012 Share Posted February 14, 2012 So i am trying to make a quest, in which the nsc just wants to buy a hide shield from the player. I want the script to assign ac certain quest stage, when the player obtained a hide shield(just a plain hide shield), so that the choice to sell it can appear in dialogue. However I wasn't able to find a refference for such a script... it shouldn't be too hard or comlicated, but so far nothing worked (i tried various "player" variants).Furthermore I couldn't even assign an additem to give the player some Gold(a test for what happens after he sold the shield). I only have some scriptingexp. from a quest i made for FNV, so please help me. :-( thx in advance, Caiman *not as detailled, cause i wrote with my mobile* Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 The scripting language used in Fallout: New Vegas isn't used in Skyrim. Instead, Skyrim uses an entirely new language called Papyrus. I recommend you take a look at the wiki's scripting reference before you try to write any scripts. Cipscis Link to comment Share on other sites More sharing options...
Caiman Posted February 14, 2012 Author Share Posted February 14, 2012 (edited) I am actually working alongside their Quest-tutorial... but I still couldn´t find anything fitting! :( I just want activate a SetStage when the character obtains(or already has) 1(or more) hide shields... Edited February 14, 2012 by Caiman Link to comment Share on other sites More sharing options...
Caiman Posted February 14, 2012 Author Share Posted February 14, 2012 I continued to experiment: Activating the quest works(queststage is shown as 10). I added this script to the armor ArmorHideShield:Scriptname QRW1script extends ObjectReference Quest Property QRW1 Auto {Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer) if (newContainer == Game.GetPlayer()) if (QRW1.GetStage(10)) QRW1.SetStage(20) endif endif EndEvent} When I kill a bandit and get a hide shield though, the stage is still set to 10. :S Do I need to attach that script somewhere else for the game to notice and activate it? Link to comment Share on other sites More sharing options...
kromey Posted February 14, 2012 Share Posted February 14, 2012 (edited) You're using GetStage() incorrectly -- it's not a direct test that you can supply a target stage to and get a true/false response, but rather it literally just gets the current stage, and returns it to you. So instead ofif(QRW1.GetStage(10))you needif(QRW1.GetStage() == 10) Edited February 14, 2012 by kromey Link to comment Share on other sites More sharing options...
Caiman Posted February 14, 2012 Author Share Posted February 14, 2012 (edited) Alright. :) So that and the unnecessary space makes: Scriptname QRW1script extends ObjectReference Quest Property QRW1 Auto {Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer) if (newContainer == Game.GetPlayer()) if (QRW1.GetStage() == 10) QRW1.SetStage(20) endif endif EndEvent} Still doesn´t work though. :S I pick up the shield out of the container(a dead body ^^ ) and nothing happens... sqv states the stage is still 10.(the property is linked to the quest in question and the stage was 10 before i picked the shield up) edit:And this didn´t work either:Scriptname QRW1script extends ObjectReference Quest Property QRW1 Auto {Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer) if (newContainer == Game.GetPlayer()) if (QRW1.GetStage() < 20) QRW1.SetStage() == 20 endif endif EndEvent} There is a slot for papyrus scripts for every armor... but is that really the right place to enter that script? I can´t see why it shouldn´t work... Edited February 14, 2012 by Caiman Link to comment Share on other sites More sharing options...
kromey Posted February 14, 2012 Share Posted February 14, 2012 Get rid of the curly braces {...} around your Event block -- I dunno what they do in Papyrus (if anything), but at the very least they're unnecessary, and they could be causing problems. Where is this script attached? It looks like it's being attached to the quest, not a hide shield, which would mean that your script is looking for the quest to change containers! Check out how it is done in the tutorial -- the script is on the object, not the quest -- although note that you should create an alias for hide shields instead of modifying the base object (as the tutorial mentions later). Link to comment Share on other sites More sharing options...
Caiman Posted February 14, 2012 Author Share Posted February 14, 2012 (edited) That script is currently attached to the base item of the shield- I set the property for the quest, so that it could find it. Now that I got rid of the brackets... it suddenly doesn´t compile anymore. ^^Now I wonder what those do, too. Thats exactly what I want to do. How do I create an alias which refers to EVERY Hide Shield the player could find(I don´t want to work with a unique item here)? p.s.:Thx for the help. :) I´ve been stuck for more than 5hours now... Edited February 14, 2012 by Caiman Link to comment Share on other sites More sharing options...
kromey Posted February 14, 2012 Share Posted February 14, 2012 You should be able to make an alias that simply points to the FormID of the shield itself. I'm at work so can't do anything to test it, nor even to provide you more specific instructions, but I think what you want is a "Specific reference", and then select the base item of the hide shield. I think. Maybe. What error(s) do you get on compile with the braces removed? Link to comment Share on other sites More sharing options...
Caiman Posted February 14, 2012 Author Share Posted February 14, 2012 (edited) QRW1script.psc(8,8): argument aistage is not specified and has no default value QRW1script.psc(8,19): cannot compare a none to a int (cast missing or types unrelated) "Specific Reference" needs a reference in a particular cell. I tried to use "Create Reference to Object"(from the tutorial), but that will only refer to the Shield I created "in" a bandit i guess. Edited February 14, 2012 by Caiman Link to comment Share on other sites More sharing options...
Recommended Posts