Fallout 2 mod random encounters

Discussion in 'Fallout General Modding' started by Nirran, May 10, 2019.

  1. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    is it possible to return the hex of placed critters on enter of said encounter>?want to move dude away farther from them based on perception and sneak(or outdoors)
     
  2. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    281
    Oct 29, 2015
    https://github.com/phobos2077/sfall/issues/102
    the list_xxx functions can be used to loop over all items on a map. list_begin takes an argument telling sfall what you want to list. (Defined in sfall.h) It returns a list pointer, which you iterate through with list_next. Finally, when you've finished with the list use list_end on it. Not calling list_end will result in a memory leak.
    Alternatively, use list_as_array to get the whole list at once as a temp array variable, which can be looped over using len_array and which you don't need to remember to free afterwards.
     
  3. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    yea knew about lists,thougth was an easier way