Jump to content

Creating a dead player container...need help?


JetSteele

Recommended Posts

Solved. Answer In Second Post.

 

In my Nephilim mod I'm making my own death sequence for that specific race. Got the scripting down but since your "dead" and you soul gets sent to a limbo of sorts before you do a small quest to return to the land of the living I'm removing all loot from the characters inventory (it wouldn't make sense to me that a ghost still has the gear from his corpse somehow).

 

However I don't want to just up and destroy everything. It might cater to more heavy rpg players but the more casual players won't enjoy the loot that they spent their time collecting just disappearing. I thought about creating a container of the player (how a regular npc dies then turns into a container for the loot) but I have no idea how I would go about making one.

 

I recall seeing a death mod that when the player dies he turns into a ghost and then has a body duplicate of himself wherever he died and when he returns there and clicks on the corpse he returns alive again. Not exactly what I'm looking for but it might help me to make a derivative and create a container corpse (that looks like the player)...however I am drawing a blank and have no idea what that mod was called (it was quite old).

 

If someone knows the mod I'm talking about or can point me in a direction for the script fragment I need to get a corpse for the player it would be much appreciated.

Link to comment
Share on other sites

I feel really dumb right now...not even 30 minutes after posting I got an idea and it worked. So for anyone else that needed this for whatever, here is the fragment I came up with. Essentially you need to create a dummy actor which I called MyGhost and an ActorBase which I called MyGhostBase. Remove all items from it since it always has iron armor (don't know why this is) and set its essential flag to false (its essential flag is on at the beginning for some reason) then kill it and transfer all your items to it. Done you got a corpse container duplicate of the player.
This is the fragment which I added to my script which got me my body:
MyGhostBase = PlayerRef.GetActorBase()
MyGhost = PlayerRef.PlaceAtMe(MyGhostBase) as Actor
MyGhost.SetRestrained(1)
MyGhost.SetAlpha(1.0)
MyGhost.RemoveAllItems()
MyGhost.GetActorBase().SetEssential(false)
MyGhost.Kill()
PlayerRef.RemoveAllItems(akTransferTo = MyGhost)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...