Dooge Posted August 10, 2016 Posted August 10, 2016 If I know the ID of an item, how do I create a copy of it in the script? int ID = 12345 form Item = (ID as form) Incompatible types Or ObjectReference akItemReference akItemReference = (123 as int)
Guest Posted August 10, 2016 Posted August 10, 2016 Depends of you want to spawn a copy of the base object as ObjectReference or you want the real instance. In the former case: PlayerRef.PlaceAtMe(Game.GetFormEx(id)) In the latter case: Form res = Game.GetFormEx(id)
Dooge Posted August 10, 2016 Author Posted August 10, 2016 GetForm or better, GetFormFromFile Hullo ffabulous, long time no see. Thanks, that the thing I wanted. Code works now. Depends of you want to spawn a copy of the base object as ObjectReference or you want the real instance. In the former case: PlayerRef.PlaceAtMe(Game.GetFormEx(id)) In the latter case: Form res = Game.GetFormEx(id) Thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.