Detecting Dead NPCs via RefWalk

Post » Tue May 17, 2011 3:22 am

I am trying to use refwalking

GetFirstRef 200 2 0


im searching 2 cell depth so I should definitely find them

Anyway, anyone have some info on why it seems that actors that are dead seem to be skipped over by ref walking?

P.S. most of these dead guys are ones that are recently killed so i dont think the cache has lost track of them yet
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm

Post » Tue May 17, 2011 1:23 pm

Without the script it's a bit hard to say, have you tried:

set actor to apple			set actor to getNextRef


if you do not set your reference to something else before getNextRef, the variable may not be updated correctly, it's a known bug.

Try

ref actorBegin GameMode	set actor to GetFirstRef 200 1 0 ; Actors	Label 10	if actor.getDead == 1		; Do stuff with actor		set actor to apple ; Prevent apple bug		set actor to GetNextRef		Goto 10	endifEnd

User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Tue May 17, 2011 4:52 am

Without the script it's a bit hard to say, have you tried:

set actor to apple			set actor to getNextRef


if you do not set your reference to something else before getNextRef, the variable may not be updated correctly, it's a known bug.

Try

ref actorBegin GameMode	set actor to GetFirstRef 200 1 0 ; Actors	Label 10	if actor.getDead == 1		; Do stuff with actor		set actor to apple ; Prevent apple bug		set actor to GetNextRef		Goto 10	endifEnd



The hell is apple, I see that randomly all the time lately and it annoys me :toughninja:
User avatar
scorpion972
 
Posts: 3515
Joined: Fri Mar 16, 2007 11:20 am

Post » Tue May 17, 2011 6:28 am

From http://www.cipscis.com/fallout/tutorials/loops.aspx:

One potential bug that you should be aware of when using a reference walking loop is the "apple" bug. In some cases, GetNextRef will not correctly update the variable that you are using to store the current reference. This can be fixed by setting this variable to an arbitrary value before calling GetNextRef.

In Oblivion, where the bug was first encountered, this arbitrary value was the "Apple" form, so the bug was called the "apple bug". In Fallout 3, I always use "Pencil01" as the arbitrary value, but I still call the bug the "apple bug" so that anyone familiar with it from Oblivion scripting will know what I'm referring to.

User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Tue May 17, 2011 5:11 am

Hmm, I see thanks.
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am

Post » Tue May 17, 2011 12:59 pm

Hmm, I see thanks.


I put in the Apple piece, hopefully that will work. Thanks.
User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm


Return to Fallout 3