Jump to content

superfid2006

Premium Member
  • Posts

    3
  • Joined

  • Last visited

Nexus Mods Profile

About superfid2006

superfid2006's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I'm going to bookmark that page for later, thanks for the link. So far, I struggled along self-contained while reading the Geckwiki, so having some perspective from other modders should be helpful. Thanks!
  2. I never heard of event handlers before, but I will look into that. Thanks!
  3. Hello everyone, I've recently been working on adapting the Pariah Dog encounter from FO2 into NV, and finished replicating the critical failures from FO2 into the game. Sadly, as of right now, the critical failures only work on the player himself, while in FO2 it affected not just you but every enemy as well. My question is: how can you reference every hostile enemy from within the script? As I imagine it, it should be possible to reuse (most of) the functions I already wrote by just replacing the references to the player character with references to the enemies, but I have no clue how I could go about doing so. Here is the mod if you wish to take a look. PS: I just started out with scripting New Vegas, or scripting in general really, a few days ago. So if you happen to spot common newbie mistakes or have some suggestions about common practices, I'd appreciate it. Cheers! EDIT: One way I could think of (without actually testing it, mind you) would be to use NVSE's GetRefs function to get a list off all actors, and maybe somehow filter the resulting array for only hostiles? int i int j int iNumberVictims int iNumberEnemies array_var aJinxedVictims array_var aJinxedEnemies Begin OnStartCombat let aJinxedVictims := GetRefs 200, -1 ;Gives an array with each actor's Ref inside set i to 1 set j to 1 set iNumberVictims to Ar_Size aJinxedVictims while i <= iNumberVictims ;Goes through the whole array and adds only the ones who are in Combat with the player to the other array. if eval (aJinxedVictims[i].IsInCombatWithPlayer == 1) let aJinxedEnemies[j]:= aJinxedVictims[i] ; This array should have keys filled with refs of enemies and empty keys let j+= 1 endif let i += 1 loop END This is the first time I looked at arrays, but this SHOULD give us an array named aJinxedEnemies containing actors who are in combat with us, right? If so, then it should be possible to loop the script I am using on only the player right now for every single REF inside of the array, making it affect every enemy as well (this might also affect friendlies, but that's even better considering the original Jinxed perk).
×
×
  • Create New...