ZZhukov Posted August 6, 2015 Share Posted August 6, 2015 I have a problem compilating a tiny script fragmet, but I can't figure out what I'm doing wrong. I'm trying to change the owner of a cell within a quest and all I got is this outcome:Starting 1 compile threads for 1 files... Compiling "ZZZ_DummyQuest_02000D62"... D:\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\ZZZ_DummyQuest_02000D62.psc(20,10): SetActorOwner is not a function or does not exist No output generated for ZZZ_DummyQuest_02000D62, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on ZZZ_DummyQuest_02000D62The script is in a quest stage, and is just as simple as this:Alias_Cell.SetActorOwner(none)Nothing more, nothing less. The alias points to a Location Alias. What am I missing? Link to comment Share on other sites More sharing options...
scrivener07 Posted August 6, 2015 Share Posted August 6, 2015 That is because neither LocationAlias or Location have a function named SetActorOwner()In order to get a cell in script you need an ObjectReference to something in the game world such as an Actor. So if I follow the reference correctly your fragment should be closer to this.. Cell myCell = Game.GetPlayer().GetParentCell() myCell.SetActorOwner(Game.GetPlayer().GetActorBase()) Link to comment Share on other sites More sharing options...
ZZhukov Posted August 6, 2015 Author Share Posted August 6, 2015 (edited) Ok, that's useful. Thanks! Solved, using an object in the cell:Cell myCell = Alias_Axe.GetReference().GetParentCell() myCell.SetActorOwner(Game.GetPlayer().GetActorBase()) Edited August 6, 2015 by ZZhukov Link to comment Share on other sites More sharing options...
scrivener07 Posted August 6, 2015 Share Posted August 6, 2015 I do think anything can be an objectReference. Try adding/filling an alias to any old thing and use get ref. Not sure I remember the quirks of quest fragments but it should be something like this.ReferenceAlias property MyContainer Auto Function MyBodyIsAFragment() ObjectReference containerRef = MyContainer.GetReference() Cell myCell = containerRef.GetParentCell() myCell.SetActorOwner(Game.GetPlayer().GetActorBase()) EndFunction edit: LOL you ninja posted me! Link to comment Share on other sites More sharing options...
Recommended Posts