morbid_angel Posted November 20, 2009 Share Posted November 20, 2009 I'm having some trouble lately, i'm trying to make a battlefield where when you kill a foe it keeps resurrecting everytime you kill it after a few seconds. Was trying to make a timer but i just can't compile the script right; so i tried to simply make one like this: scn zres begin On Death RessurectActor end and placed it on the npc, but when i kill it after a few seconds he just disappear (limbs included). so i try to exit and enter again the "room\battlefield\whatever" and it suddenly reappear.... I just can't understand how this resurrect thing works, or why the character simply disappear; anyone have any clue? thanks in advance Link to comment Share on other sites More sharing options...
gsmanners Posted November 21, 2009 Share Posted November 21, 2009 The ResurrectActor function isn't quite that simple. - Calling ResurrectActor on NPCs with the animate flag false (i.e. either absent or 0) can cause Fallout 3 to crash - Calling Resurrect on an actor with the animate flag true (or 1) will cause them to fall through the geometry unless it is called in the same frame as their death. See also: http://geck.bethsoft.com/index.php/SetUnconscious Link to comment Share on other sites More sharing options...
morbid_angel Posted November 21, 2009 Author Share Posted November 21, 2009 Yes, that what i meant, it isn't simple, i read the instructions on the Geck page, in fact my script had the ResurrectActor set to 0; the game didn't crash, the NPC just disappear and reappear when you enter the room again; The SetUnconcious command didn't exactly solved my problem; in fact the NPC get "reanimated" one time but whit his limbs\head missing and the animation\behaviour are all messed up, and if you kill him for the second time he simply didn't revive itself again. Anyone knows how to compile the resurrect actor correctly to work continuously?? (and correctly) thnx a lot Link to comment Share on other sites More sharing options...
gsmanners Posted November 21, 2009 Share Posted November 21, 2009 Obviously this is a long-time bug in Gamebryo, and unless you happen to have the source code to that lying around, I doubt it's really possible. It isn't really possible to reanimate a dead actor. The best you can do is wait until the actor isn't visible to the player (with GetLOS), then delete the old actor and replace it with a new copy of the same actor. Link to comment Share on other sites More sharing options...
morbid_angel Posted November 21, 2009 Author Share Posted November 21, 2009 i partially solved adding a marker and a moveto marker command to the script; so actually the NPC resurrects at the marker spot. It works just fine, i hoped it could be revived where it actually died, but i guess this is the best i can do. Link to comment Share on other sites More sharing options...
Zumbs Posted November 21, 2009 Share Posted November 21, 2009 How about checking the Essential checkbox? Link to comment Share on other sites More sharing options...
jaysus Posted November 21, 2009 Share Posted November 21, 2009 scn bla begin ondeath resurrect end just do it like that and they respawn where they die... (see the trollroaches in my commonwealth of modders mod for an example) Link to comment Share on other sites More sharing options...
morbid_angel Posted November 21, 2009 Author Share Posted November 21, 2009 Marking an npc as essential won't allow him to die, so no dismemberment or decapitation or explosion. The problem with the script (both ResurrectActor or just Resurrect) is that the actor actually revive itself, but disappear! It reappear only if you exit and reenter the room\space; so probably he is falling trough geometry? (in the manual it says that it happens if you set the animation variable true, yet i set it to false). So for now the only thing I can do for now is move it (moveto) to a marker... Sigh Link to comment Share on other sites More sharing options...
gsmanners Posted November 22, 2009 Share Posted November 22, 2009 Whatever works, although I'd be careful with that moveto. I recall from earlier experiments that moveto with a dismembered body would cause the game to crash (not every time, but sometimes). Link to comment Share on other sites More sharing options...
fcterryb Posted December 15, 2009 Share Posted December 15, 2009 Whatever works, although I'd be careful with that moveto. I recall from earlier experiments that moveto with a dismembered body would cause the game to crash (not every time, but sometimes).probly a bit late for this but for those interested ive had succes with using a script like below for resurecting actors in fallout 3 set xt to target.getpos x;store x positionset yt to target.getpos y;store y positionset zt to target.getpos z;store z positiontarget.resurrect 1target.disabletarget.moveto targetmark; marker located in a dummy celltarget.enabletarget.moveto playertarget.setpos x xt;set x positiontarget.setpos y yt;set y positiontarget.setpos z zt;set z position Link to comment Share on other sites More sharing options...
Recommended Posts