Jump to content

Problems with FindAvailableActor / ValidateActor + Suggestions


Recommended Posts

Problem 1:

Currently these functions ignores that an actor is sleeping. There should be a filter for them.

 

Problem 2:

If I use this function in a military camp also the hurt actors will be found. There should be a filter for them.

 

Suggesion 1:

Provide a FormList (Utils FormList) with a list of ignored actors as parameter would be more flexible

 

Suggesion 2:

Provide a lastSex time-range parameter to filter actors that had sex within this range. Many mods use SL aroused to avoid repeating sex partners - but it may be enough to use the lastSex statistics instead. (Especially for my mod, I dont want aroused because it can cause script lags)

 

Sugesstion 3:

Provide FormList parameters with faction lists and/or keyword list as filter criteria

Link to comment

Regarding wounded and sleeping actors:

bool function IsActorWounded(Actor act) Global
	Package curActorPackage = act.GetCurrentPackage()
	; CWFortSoldierWoundedPackage = 0xfd82c
	return curActorPackage == none || curActorPackage.GetFormID() != 0xfd82c
endfunction

bool function CheckActor(Actor CheckRef, int CheckGender = -1)
	int IsGender = ActorLib.GetGender(CheckRef)
	return (CheckGender != 2 && IsGender != 2 && (CheckGender == -1 || IsGender == CheckGender) && ActorLib.IsValidActor(CheckRef)) && CheckRef.GetSleepState() == 0 && !IsActorWounded(CheckRef)
endfunction
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use