Basically I'm trying to emulate the effect of the player dying, and then allowing him to be scripted to do what I wish. The primary goal is just to merely leave an actor that looks like the player on the ground, and then give him all the players items.
I can handle the players death and resurrection right now, but my attempt to create a fake corpse is proving to be difficult.
I have some code here, but it doesn't seem to do anything.
ScriptName PlayerLichQuestScript extends Quest ConditionalObjectReference Property New_Player_Ref AutoActor Property Player AutoEvent OnInit() Player = Game.GetPlayer()EndEventFunction Lich02Death() ;If Player.GetItemCount("LichTest1") == 1 Actor New_Player = Player New_Player_Ref = New_Player New_Player_Ref.ForceAddRagdollToWorld() New_Player_Ref.RemoveAllItems(None, false, true) Player.RemoveAllItems(New_Player_Ref, true, true) New_Player.Kill() Player.Resurrect() Player.SetAV("Health", 10) Game.ForceFirstPerson() ;Player.Moveto(LichDeathMarker) ;EndIfEndFunctionLich02Death, the function I'm working with, is called during the Players OnDying() event. This works as planned, and the player will be resurrected after it is run. I'm assuming it's actually doing something with the New_Player_Ref as well, but I really can't say. I do know that with this current script, after I was killed in rapid succession 4 times, the game crashed. I do not know if the "New Player" creation was the cause or not though. Now that I'm really looking at it actually, I'm pretty sure that "Actor New_Player = Player" doesn't actually do anything except create a variable with the same properties as the player (and thus perhaps all I'm doing is abusing the crap out of the player...)
Any help welcomed!
