Jump to content

make a dead body disappear after you loot it


KimCheeWarrior

Recommended Posts

Bearing in mind that i don't actually code the second one looks like it would cause an error somewhere to me. Shouldn't if statements have an else? Would it just run a loop without one? Would it still try to run the second if check if the first failed? if it ran the second one and found no inventory wouldn't it just delete any critter living or dead that had no inventory?

 

 

It has to get past the first If statement (where it checks if the thing is dead) to get to any statements inside that If statement. It wouldn't delete any living creature without an inventory, though it would delete dead creatures with no inventory as soon as they register as dead. Adding a timer that delays the deletion for a few seconds would prevent things from vanishing the second you kill them. Of course, you might not care about that anyway, since this is an immersion-breaker anyway.

 

well the script could make the bodies disappear after you leave the room ...

by exemple megaton . its odd after you kill burke if you did see the body later

moriarty would probaly order gob to remove the body and throw away anywere

Link to comment
Share on other sites

well the script could make the bodies disappear after you leave the room ...

by exemple megaton . its odd after you kill burke if you did see the body later

moriarty would probaly order gob to remove the body and throw away anywere

no, i mean make the dead body disappear immediately, right before your eyes as soon as the body is completely looted.

Link to comment
Share on other sites

Making the body dissapear immediately would be easier. Making it happen when the player leaves the room might be very difficult, I don't think object or effect scripts are run in cells that the player isn't in, but there is a line of sight check, GetLOS that could be used if someone didn't want to see the body vanishing.

 

Just thought of something else that might help. If the code was put into the ScriptEffectUpdate block of an effect script, then it could be started by the OnDeath block of another script by using CastImmediateOnSelf. That way, the If GetDead part could be taken out leaving just 1 If statement that only runs on dead NPCs. It would still mean that an NPC with no items would vanish on death unless a GetLOS check was added. But until the NPC dies no extra code is running at all.

Link to comment
Share on other sites

 

well the script could make the bodies disappear after you leave the room ...

by exemple megaton . its odd after you kill burke if you did see the body later

moriarty would probaly order gob to remove the body and throw away anywere

 

Ya, I've always thought it was a bit odd that everyone's just wandering around stepping over a corpse like they're just a napping hobo. I've noticed that some people stay and others don't tho, just recently I went through and killed everyone in Megaton but Moira and the kids before blowing it up and on the return trips to visit Moira before I was ready to say goodbye to the place I couldn't find most of the bodies I left around. (unless I dusted them and forgot about it?)

Link to comment
Share on other sites

Why don't you just open the console, click the body and type "disable"? It usually removes the dead body. You can even type resurrect 1 and the body will respawn and you can loot it over and over,. :) I often do this for Enclave soldiers to get their gear again.
Link to comment
Share on other sites

Why don't you just open the console, click the body and type "disable"? It usually removes the dead body. You can even type resurrect 1 and the body will respawn and you can loot it over and over,. :) I often do this for Enclave soldiers to get their gear again.

because this kill any sense of immersion of doing so .

Link to comment
Share on other sites

Why don't you just open the console, click the body and type "disable"? It usually removes the dead body. You can even type resurrect 1 and the body will respawn and you can loot it over and over,. :) I often do this for Enclave soldiers to get their gear again.

because this kill any sense of immersion of doing so .

 

also, it's tedious. I'd rather have them disappear on death an just drop their gear to the ground.....or maybe a tweaked alien blaster or plasma gun that allows me to dust dead bodies kinda like a zat'nik'tel.

Link to comment
Share on other sites

I'm currently working on a weapon that vanishes corpses as a side effect, for some reason just disabling and deleting the target still leaves it showing on screen but I've found this seems to work if anyone wants to make their own zat... thingy. (Haven't tested this section in isolation like this, so if there's any problems let me know)

 

short NamePos
Begin ScriptEffectStart
if GetDead==1
Disable
Set NamePos to GetPos Z + 100
SetPos Z NamePos
MarkForDelete
endif
End

 

If that script is made into a weapon effect, with a duration of maybe 1 second, and added to a weapon, it should delete any target if already dead, or if killed by the modded weapon, so a lethal hit wil delete the target before looting can occur. To get around this, you could make the script auto-looting like this:

 

short NamePos
Begin ScriptEffectStart
if GetDead==1
RemoveAllItems PlayerRef
Disable
Set NamePos to GetPos Z + 100
SetPos Z NamePos
MarkForDelete
endif
End

 

If you wanted to make the body look like it was being vaporised though, you could make a modified version of an explosion, call it something like ExplosionZatDust, then add this line

 

PlaceAtMe ExplosionZatDust 1

 

I've used a modified flash bulb explosion with a different sound effect, size, and image space modifier and that seems to work nicely, but depending on how the weapon is supposed to work, different effects might be more suitable.

You could add a shader effect and sound to play for a second before the explosion and dissapearence if you played around with the ScriptEffectStart and ScriptEffectFinish blocks, using PlaySound3d and PMS commands.

Anyway, hope this is helpfull to someone.

 

Edit 24-02-2012 - oops, noticed an undeclared variable in that code, it's fixed now but further testing has shown it's unreliable anyway.

Edited by caramellcube
Link to comment
Share on other sites

Good idea Sette1893.

I retested the code I posted earlier and it now seems it only works properly sometimes, other times the corpses are still visible even after being killed, disabled, moved and deleted. I've tried changing the code to drop them into Old Olney then delete them but for some reason they get ressurected instead (of course the locals are quite happy to undo that, but it still doesn't clean up the wasted memory). That anchorage script might be the answer.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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