Jump to content

[Scripting] "GetRace" alternatives? (wanna compare actors with each other)


Nymra

Recommended Posts

Posted

I want to check if actors have the same "race" (for a defeat mod, what else)

 

this is the line I found to work with (from Sexlab Adventures)


(Aggressors[0].GetActorBase().GetRace() == Aggressors[1].GetActorBase().GetRace())

 

but this function I think will also check for human races like "nord" or "Breton" and return "false" in that case, no?

 

I basically just want to check if:
- Actor 1 and 2 are both human (be nord, argonian, etc)  or both the same type of creature (for example both falmers)

 

hmm

Posted

You could try just checking the Playable race flag..... Not sure are werewolves playable?

 

And just to note. Follower mods often create an entirely new race and they are generally not playable. So if you were to check them they would not pass as human. 

 

Problems, problems. 

 

You could also check their voice against a voice list. But again. Custom voiced Npcs would not be considered human.....

 

Either solution would probably cover 95% of cases at least I guess...

 

Edit: Of course werewolves aren't playable otherwise they'd be selectable in race menu. Excuse momentary stupidity. 

Posted
4 minutes ago, Monoman1 said:

You could try just checking the Playable race flag..... Not sure are werewolves playable?

Vampire races are also considered unplayable.

Archived

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

  • Recently Browsing   0 members

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