Duplicating a dead body
Blitz3D Forums/Blitz3D Programming/Duplicating a dead body
| ||
In my vs shooter I want the characters to respawn but I want their bodies to remain. I tried using copyentity but it just creates a copy of the character in his regular animation. How do I create a duplicate with the copied body to be in death anim that the character was in when he died? Suggestions please. |
| ||
Copy the dead body. Then you'll have two copies of the body, in the dead position. Failing that, have two copies of the mesh loaded in, and switch between. I'm not too familar with animation and how they copy.... |
| ||
Leave the body as it is, and then respawn a new one using CopyEntity(). |
| ||
Now why couldn't i have said it that way ;) |
| ||
I thought the idea was to get rid of the bodies, not make more of them. Edit: Oh, in Blitz3D. |
| ||
|
| ||
Copy the dead body. Then you'll have two copies of the body, in the dead position. Not quite , you'll have one dead body and one body that is on the first animation frame of sequence 0. |
| ||
get the frame of the dead body and animseq and then load a copy and using setanimtime put the new entity in the frame and animseq values to get the new dead body.. Simple :) |
| ||
I would go with the two meshes idea and have a seperate dead body and replace the animated character with the body as suggested above. I dont know if Blitz will keep trying to animate the corpse otherwise and this may case a speed hit but with a standard mesh there is no trouble. |
| ||
if you use setanimtime to set it to the right seq and frame, it won't animate again until you keep running setanimtime or animate on the new deadbody entity. |