Jump to content

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

Recommended Posts

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)



Link to comment

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. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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