MiscObject Property Gold001 Auto ; CKで紐づけしておくこと Furniture Property Bedroll Auto ; CKで紐づけておくこと Function PutChest() Actor kPlayerRef = Game.GetPlayer() Float fAngleZ = kPlayerRef.GetAngleZ() ; Disableで作ると姿が見えない ObjectReference kGoldRef = kPlayerRef.PlaceAtMe(Gold001, , abInitiallyDisabled = true) ; プレイヤーの目の前に持ってくる kGoldRef.MoveTo(kPlayerRef, 80.0 * Math.Sin(fAngleZ), 80.0 * Math.Cos(fAngleZ), 20.0, abMatchRotation = false) ; 間違って拾ってしまわないようにアクティベートを禁止する kGoldRef.BlockActivation() ; 3Dを待つ kGoldRef.Enable() Utility.Wait(0.5) ; 上に向かってわずかに力を加える(すると落下しはじめる) kGoldRef.ApplyHavokImpulse(0.0, 0.0, 1.0, 0.1) ; 地面に着地して安定するまで待つ Utility.Wait(2.0) ; ベッドロールを用意する ObjectReference kBedrollRef = kPlayerRef.PlaceAtMe(Bedroll, abInitiallyDisabled = true) ; コインの位置に持ってくる kBedrollRef.MoveTo(kGoldRef) ; コインはもういらない kGoldRef.Delete() ; ベッドロールを表示する kBedrollRef.Enable() EndFunction