reset dead enemys after you leave interior cell.

Post » Wed Jun 20, 2012 2:24 pm

Hi all!

how do i make the interior cell reset its enemys?
so after i kill every enemy in that cell/dungen how do i make
them reset so i can go back and do it all over again.
Im not very good at scripting can some one help me?

Thanks!
User avatar
Prohibited
 
Posts: 3293
Joined: Tue Jun 12, 2007 6:13 am

Post » Wed Jun 20, 2012 1:15 pm

Calling Reset() on the mobs is supposed to do that (resurrect them and return them to their editor location), though some things don't get reset.
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Wed Jun 20, 2012 2:34 pm

what do you mean call reset? a script? and whats a mob? the enemys?
if so do i have to do it for each enemy?
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Wed Jun 20, 2012 1:44 pm

"MoB" is short for "Mobile Object" and refers to anything in a game that moves of it's own accord. In this case, it's NPCs in the dungeon.

In order to make a resetting dungeon, you will need to add a script to the NPCs in there that calls the reset function on them. This can be done easily by simply editing each one from the render window, going to the last tab on the far right "Scripts", and adding a script like this (Make a new script, give it a name like "RespawningEnemy" and have it extend Actor.)

Event OnInit()    UnRegisterForUpdate() ; Prevents double registration if OnInit() happens twice    RegisterForSingleUpdate(10)EndEventEvent OnUpdate()    if GetParentCell() != Game.GetPlayer().GetParentCell() && IsDead() ; If we are dead and the player's not here	    Reset()    endifEndEvent
User avatar
Auguste Bartholdi
 
Posts: 3521
Joined: Tue Jun 13, 2006 11:20 am

Post » Wed Jun 20, 2012 6:32 pm

Ok thanks so much for your help have just added the script every thing saved fine.

just have a few quections to check im doing it right

1 whats a NPC? i think its a person you can talk to like a villager or some thing if so,
does this include enemys with the M markers.

2 how would i test this as i cannot go coc? because this allways resets dosnt it?

3 last but not least i have got random enemy spawning in some places.
i have a draugr coffin and no enemy linked refed to the coffin or the marker yet i still
have a draugr outside the coffin any ideas why? oh and he is alive.

thanks!
User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm

Post » Thu Jun 21, 2012 12:06 am

I think ambushes is one of the things that aren't reset. If they're already "awake" they typically remain awake.

NPC simply means "Non Player Character" which is any actor that is not the player.

Why can't you COC? did you not place the marker, and/or can't remember the name of your cell?
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Wed Jun 20, 2012 6:15 pm

I can coc but if i coc to test that the reset works wouldnt it be pointless
because every time you coc it resets any way. How can i test
the coc reset, when coc all ready resets it.

I just tried to test it in real game (NOT COC) i made 4 draugr's in a brand new testing cell.
and one draugr boss not with ambush. placed the reset script u said on all of them,
made a door added it to the outside world, and tried it in real game.
I killed every thing in the cell the 4 druagrs' with ambush script on.
and the other draugr boss with no ambush off.

But when i killed them all left the cell went back in they were all dead on the floor.
have i done something wrong?
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am


Return to V - Skyrim