hotrods20 Posted May 29, 2015 Share Posted May 29, 2015 I'm working on a custom version of the Zombie Apocalypse mod and have been cracking away at making it better for lesser computer systems and just removing some of the laggiest parts of the mod. One being dismemberment and ash/goo piles. I've already set it to remove dead bodies that have no inventory. I just need to make it so the zombies no longer explode into bits and no longer create ash piles. Does anyone have an idea of how to make it so an NPC doesn't explode or melt when they die? My current attempts:1. Setting the zombies to essential until they go unconscious and have zero health.This idea didn't work because "SetEssential rSelf 0" didn't set the "dead" zombies to being unessential. I checked if the zombies died by using this if statement,"if (IsEssential == 1 && GetKnockedState == 1 && GetHealthPercentage <= 0.01)" More attempts will be added as I try them... Link to comment Share on other sites More sharing options...
tomm434 Posted May 29, 2015 Share Posted May 29, 2015 I just need to make it so the zombies no longer explode into bits and no longer create ash piles. Does anyone have an idea of how to make it so an NPC doesn't explode or melt when they die?ok, you can add this to their object script begin OnDeath disable endThey will dissapear when dead. begin gamemode "if (IsEssential == 1 && GetKnockedState == 1 && GetHealthPercentage <= 0.01)" endifendAlso if you use object script like that for every zombie it can slowdown game much. In object script this code runs every frame (up to 120 frames per second) for every zombie and if you have too many zombies in the cell that can slowdown the game. Also script runs even if they are dead and disabled. So I suggest you use "OnDeath" script. It will be bad if they dissapear on death but if you have too many of them that can decrease cpu load. I have more ideas for this but that would require use of NVSE arrays. Link to comment Share on other sites More sharing options...
hotrods20 Posted May 29, 2015 Author Share Posted May 29, 2015 The problem with the Begin OnDeath thing is that the zombies have items that I want the player to loot. The zombies bodies will disappear if they are empty or if the player selects an option to remove them. Link to comment Share on other sites More sharing options...
Recommended Posts