Jump to content
⚠ Known Issue: Media on User Profiles ×

Need script to make a crafted Item a Quest Object.


Masterofnet

Recommended Posts

I hadn't realized that certain functions might not work. If OnInit isn't firing, that would explain why. But If we're going to make a PlayerREF alias and monitor the inventory, we might as well use that script instead, right?

 

Try putting this on a PlayerREF alias and let us know if it works at all (the weapon itself needs no script for this one, and if it's armor, change that in the script)

 

 

Weapon Property MyObject Auto
ReferenceAlias Property RefAlias Auto

Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
	If ( UI.IsMenuOpen("Crafting Menu") && akBaseItem == MyObject )
		Utility.Wait(0.1)
		Form MyObjectRef = Game.GetPlayer().DropObject(MyObject)
		RefAlias.ForceRefTo(MyObjectRef)
		Game.GetPlayer().AddItem(MyObjectRef, Silent = True)
	EndIf
EndEvent

 

 

Link to comment
Share on other sites

Probably want to do AddInventoryFilter so it only lets the specific item trigger the event. I know there is a check there but the event would still run no matter the item. In the long run with several scripts doing that you can end up with problems... lag, stack dumps, etc...
Link to comment
Share on other sites

I tried Using this in the stage.

 

Alias_Armor.ForceRefTo(GameGetPlayer().PlaceAtMe(Armor)

 

It did not work when the item was crafted or manually placed in the cell. I may not be doing it right.

 

Why is the game ignoring the force to alias when the item is crafted?? When I craft the item and I put script on it to set stage or display Objective it works fine. Then I go to the inventory and drop it.

 

When I pick the same item off of the floor after manually placing it there. It triggers the stage and I can not drop it.

 

Has no one else attempted to make a quest that involved crafting a item and had the same problem??

 

I tried the ( Script it working ) Script. It keep showing that text but continued to ignore the force to alias script. Yes the alias is empty. I works great when you pick up the item. Will not work when it is crafted. The Script is working text displays when the item is crafted.

 

Regards

Mastetofnet.

Link to comment
Share on other sites

The Script from xander9009 would not compile

 

 

Starting 1 compile threads for 1 files...

 

Compiling "A1TQCRTPlayerScript"...

 

C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\A1TQCRTPlayerScript.psc(11,40): no viable alternative at input 'akBaseItem'

 

C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\A1TQCRTPlayerScript.psc(11,61): required (...)+ loop did not match anything at input ')'

 

No output generated for A1TQCRTPlayerScript, compilation failed.

 

Batch compile of 1 files finished. 0 succeeded, 1 failed.

 

Failed on A1TQCRTPlayerScript

Edited by Masterofnet
Link to comment
Share on other sites

This script alias_Dagger.ForceRefTo(Dagger) Will not compile.

 

Starting 1 compile threads for 1 files...
Compiling "QF_A1TQCRT_02008976"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_A1TQCRT_02008976.psc(20,13): type mismatch on parameter 1 (did you forget a cast?)
No output generated for QF_A1TQCRT_02008976, compilation failed.

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

Link to comment
Share on other sites

This is the script. Added to the stage.

 

alias_Dagger.ForceRefTo(Dagger)

 

I have the dagger added to the script properties on the Quest

 

Dagger - Weapon - DaggerID

 

And I have the Dagger Alias - Empty

 

This script will compile

 

Alias_Note.ForceRefTo(GameGetPlayer().PlaceAtMe(Note)

 

But I does not work at all. On the crafted item or picked up.

 

 

The errors in Post # 17 came from the exact script in Post # 11

Link to comment
Share on other sites

  • Recently Browsing   0 members

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