uhmattbravo Posted March 16, 2016 Share Posted March 16, 2016 Hi, I'm making a mod that I don't want to divulge too much information about just yet, and I'm having trouble finding a script function that will detect whether the actor that the script is attached to is in combat with another semi specific reference. GetCombatTarget seems to return more what the actor is looking at than whether or not the two are fighting but still helps a little. For example: Short doOnceRef targetRef Begin gamemode If doOnce == 0 Set targetRef to getCombatTarget ; who the actor's looking at If *targetRef is fighting with me* ;do something Else Set doOnce to 0 ;check another target EndifEndif End I basically just need a function to check if the two refs are in combat with each other to make a proper if statement to go between the *'s. Thanks, any advice or help would be greatly appreciated. Link to comment Share on other sites More sharing options...
vforvic Posted March 17, 2016 Share Posted March 17, 2016 I guess some possibilities would depend on exactly who it was and what situation you are working on making happen. Without knowing specifics you could try giving said ref a token in their inventory and reference the token in the script instead of the ref of the actor. I guess it all depends on how specific this ref is in the game and how much leeway you have in adjusting the actor. You can always PM me more specifics you want. Link to comment Share on other sites More sharing options...
Recommended Posts