MikeMoore Posted June 28, 2016 Share Posted June 28, 2016 (edited) Hey there, I've been working on learning scripting for a little while, and I've got stuck trying to spawn an npc, and stick it in ambush furniture. When I was looking at ObjectReference on the creation kit wiki, I saw that MoveTo() allows the user to force an npc into a piece of furniture, so if I did NPC.MoveTo(Chair) it would move the specified npc straight into the chair without animations. However, when trying to do this with a leveled ghoul that I've spawned, it doesn't seem to want to stick them into the ambush furniture. I'm assuming this is because the ambush furniture works differently, but I'm new to ambushes. Any help that could be provided would be appreciated, and thanks in advance! MikeMoore UPDATE:After taking a short break from this and coming back from it I managed to get an ambush to work that spawns a ghoul every time you hit a button. Super simple, and you could obviously use something other than a button to trigger this, but it works. Here's the code, and an example: Scriptname SpawnGhoul02 extends ObjectReference Const {Spawns a ghoul, attaching it to ambush furniture} Event OnActivate(ObjectReference akActionRef) Actor Spawned = FurnitureTest.PlaceActorAtMe(LvlFeralGhoul,1) Spawned.Disable() Spawned.SetLinkedref(akIdleMarker) Spawned.SetLinkedref(FurnitureTest,LinkAmbushFurniture) Spawned.Enable() Spawned.StartCombat(Game.GetPlayer()) endEvent ActorBase Property LvlFeralGhoul Auto Const {Attached to ambush furniture} ObjectReference Property FurnitureTest Auto Const {Attached to idle marker from ambush pack in} ObjectReference Property akIdleMarker Auto Const {Auto-fill} Keyword Property LinkAmbushFurniture Auto Const http://i.imgur.com/xPD7XiE.png I'd like to put a [sOLVED] tag in the title for future readers, but I'm unsure of how to do this, so hopefully this will be okay. Edited June 29, 2016 by MikeMoore Link to comment Share on other sites More sharing options...
Recommended Posts