[HELP] how to know if enemy was killed by companion?

Post » Sat May 28, 2011 3:50 pm

is there a list of teammate reference ? i like to know if my companions kill creature by using iskiller function but i do not know how to obtain teammate refs or is it other way to tell if crature was killed by companion ? i could do refwalking with nvse but do not know a name or number of teammate list just like there is a list for all actor ( 200: Actor (for ref walking only) in fose docs), maybe there is some function that returns actor refs that killed creature co i can then use function RefName.GetPlayerTeammate to say if killer is my teammate. ??
User avatar
Lucky Girl
 
Posts: 3486
Joined: Wed Jun 06, 2007 4:14 pm

Post » Sat May 28, 2011 3:27 pm

Begin OnDeath . May mean multiple script blocks, since it's a condition on the Begin function itself.
User avatar
Donald Richards
 
Posts: 3378
Joined: Sat Jun 30, 2007 3:59 am

Post » Sat May 28, 2011 4:45 pm

If the "Add item on death" perk entry adds to NPCs that you and your companions kill (in the same way you get XP and Karma for companion kills) then you could give the player a perk with it, then add a scripted item to their inventory that checks if their killer was the player. If not, then they were killed by a companion.
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am

Post » Sat May 28, 2011 4:20 pm

no easier way ? :)
User avatar
Oyuki Manson Lavey
 
Posts: 3438
Joined: Mon Aug 28, 2006 2:47 am

Post » Sun May 29, 2011 12:58 am

Unlikely. A GetKiller function would be nice, but since they had no need for it when making the game, it's not present.
User avatar
Lloyd Muldowney
 
Posts: 3497
Joined: Wed May 23, 2007 2:08 pm

Post » Sat May 28, 2011 4:25 pm

strange it is :) sinc if there is iskiller so there must be somewhere the refference to killer put in killed actor so it should be so easy to add that imho intresting function.
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Sat May 28, 2011 3:19 pm

Aha, unfortunately it's not 'easy' per se- ask the NVSE crew. The problem is whilst the info is certainly floating around in memory, finding out *where* in memory is not a trivial task.
User avatar
Channing
 
Posts: 3393
Joined: Thu Nov 30, 2006 4:05 pm


Return to Fallout: New Vegas