|
Hi, I am currently making a video game and was wondering how to make a dead zombie once shot till it dies. I have created all of the zombie AI and when they die though they disappear. I want them to not disappear but instead fall over (Ragdoll possibly so arms aren't straight out.) I tried this and successfully did it! but there is one problem i am using Spawner Free (Asset store) and they still disappear. Also is there a way to make blood spew out of the dead zombie (Not a ton but some to drip to floor.) AND Finally will it be laggy to have a ton of dead rag dolls every where? If so can i make it so they disappear after a certain amount of time? TO summarize what i was asking for: Dead Replacement (Read more about it above to see why it is challenging) Blood for when object dies Delete dead zombie after certain time edit moved code from comment Thanks! Sam
(comments are locked)
|
|
Blood's not terribly challenging depending on how you want it to look, it can be as simple as grabbing a spot on the ground below with a raycast, spawning a plane with a blood splat on it, and slowing extending it until it and the zombie are deleted. For the deleting of the zombie, ragdoll or not, just have a dead bool in each of the zombie scripts that clocks time after death. Like this: As for ragdoll functionality having an issue, I'd look around for people's tutorials/scripts that show how to do proper ragdoll replacement. gl hf! Thanks! but i still have the disappearing problem with the spawner because the transform object isn't there because it doesn't save the modified vars. Is there a way to delete the transform and place the name of the dead zombie prefab? I will post my code below...
May 16 '12 at 11:08 PM
samdogg7
So you're saying that since you creating a new Ragdoll, which has a different transform than the zombie, it doesn't know where that transform is, or doesn't destroy it? It's all a bit confusing hehe.
May 16 '12 at 11:53 PM
Befall
Basically i am using Spawner free, it is a excellent spawning system...except it will only spawn Prefabs... I have a death replacement file (The new separate zombie) But i can't have it save that transform to a prefab, thus then making it so you can't have a death replacement.
May 17 '12 at 01:20 AM
samdogg7
Check out URG's free version in the asset store. It has a demo scene with a very easy to understand example to do what you need!
Jul 03 '12 at 07:21 AM
The Arc Games
(comments are locked)
|

@samdogg7: Please don't post additional information on the question as answer. Edit your question or post a comment below the question. Answers should answer the question ;)
Also watch your code highlighting. Just select all text that should be displayed as code and press the "101 010" button. This will just indent each line by 4 spaces and insert an empty line before and after the code block. This could also be done manually, but with the button it's really simple.