Jump to content

Recommended Posts

Posted (edited)

Yep.

 

Quick and dirty example.

Ammo property SomeAmmo auto
Keyword property ActorTypeNPC auto
 
Function AddAmmoToActors()
ObjectReference[] kActors = Game.FindAllReferencesWithKeyword(ActorTypeNPC, 4096.0) ; The length of a full cell.
 
Int index = kActors.Length
 
While index
    index -= 1
    kActors[index].additem(SomeAmmo)
EndWhile
EndFunction

If you want specific enemies, like rad roaches, just change the keyword. ActorTypeNPC will grab ANY NPC, even if not an enemy. There's a way to just check for factions but it's late here and I don't have the time to think the whole process through. Just confirming that it can be done.

Edited by TheDungeonDweller
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...