Jump to content

Papyrus Remove item help


Blaster391

Recommended Posts

This should be nice and easy for non-papyrus noobs unlike me, basicly I have the code

 

Game.GetPlayer().RemoveItem(FoodCabbage, 5)

 

And I get:

 

Starting 1 compile threads for 1 files...
Compiling "TIF__02010BF1"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02010BF1.psc(9,28): variable FoodCabbage is undefined
No output generated for TIF__02010BF1, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__02010BF1

 

I have tried this code in the papyrus fragment of a quest stage and a dialogue topic, so please, HELP!

 

Thanks in advance!

Link to comment
Share on other sites

In both fragments you have to first define a property pointing to the item you want.

 

Write something useless with a ; before it, like ";fdhsdjsakldhsadkjasdh" then compile.

 

Click ok on the quest/dialogue window and re-enter it.

 

Click properties, add property. Name it whatever you want, type (i guess) "MiscObject". Click ok. On the right click on edit value and in the dropdown select your object. Click ok.

 

Now you can safely add your script, replacing FoodCabbage with the name you gave to the property.

Link to comment
Share on other sites

  • 1 year later...

In both fragments you have to first define a property pointing to the item you want.

 

Write something useless with a ; before it, like ";fdhsdjsakldhsadkjasdh" then compile.

 

Click ok on the quest/dialogue window and re-enter it.

 

Click properties, add property. Name it whatever you want, type (i guess) "MiscObject". Click ok. On the right click on edit value and in the dropdown select your object. Click ok.

 

Now you can safely add your script, replacing FoodCabbage with the name you gave to the property.

:ermm: I just dont understand this. Maybe its because i'm not inglish but i cant figure out all the properties and stuff. I have been bussy with my quest a long time but the only thing missing is the remove item script.

 

I want to remove 2000 gold from the player's inventory because he purchased a house. I have tryed this : Game.GetPlayer().RemoveItem(Alias_Gold.GetRef()) doesnt do anything not even 1 piece of gold.

It does listen to my give item script : Game.GetPlayer().AddItem(Alias_Key.GetRef())

 

I have added gold to allies but still nothing :sad:

Please help

 

Nevermind, got it now! My screen wouldnt expand further zo i couldnt see the propeties button! thanks!

Edited by thesuperkuif
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...