I've seen lots of mods that use scripts that stop at each item/npc in a cell and do stuff to them (I believe that's the techinal term) and I thought "What a great idea, I could use something like that for my mod" but alas my efforts have proved fruitless. So I was wondering if there was anywhere that I could read up on both Ref Walk theory and its application. I basically want to step through a cell and interigate each refrence, then run a different script for each possible result. So far my results have been Nothing Happens or CTD.
This is the only documentation i've found: http://cs.elderscrolls.com/constwiki/index.php/GetFirstRef
For the FO3 version, the Form_Type codes are different: http://fose.silverlock.org/fose_command_doc.html#Form_Type_IDs
When you are doing a ref-walk loop, you are only specifying one of these types for that loop.
I prefer to run the ref-walk in quest scripts, which makes it easy to set how often the walk runs, and it will always be centered on the player's current cell.
The things i've seen (done) to make it CTD are:
1. 'Do stuff' to a ref that is zero - you need to check if getfirstref or getnextref returns zero before 'doing stuff' to it;)
2. having the GOTO command in the wrong place, so the loop keeps running getnextref after already returning zero on the previous loop.
The tutorials i've had were by reading posts here on the forum