I want to create portable tent (yeah there are many camping mods but i want to do it for training) but i cant figure out how to create new object by code, and then moving it or do other stuff with it. I Figured out how to create objects like skulls, ores and stuff, but i cant figure out how to do it with static object like ImperialTentSmall. I tried creating a tent as ObjectReference in one of the Cells and then moving it to the player but i doesn't work lol, and its not what i want to do.
My code was:
Scriptname CreateTent extends ObjectReference{lolnamiota}ObjectReference Property Namiot AutoEvent OnActivate(ObjectReference akActionRef)CreateTent()endEventMessage function CreateTent()ObjectReference tenttent = Namiottent.MoveTo(Game.GetPlayer())endFunction