Talk:GetRace

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Is there a list of possible races this can output to link to here? Does it return races other than the mostly playable humanoids? (ie not just Redguard, but Goblin or Skeleton as well?) Does this return the race of a dead body?

Goblins and Skeletons aren't NPCs so they don't have races. The function returns the formID of whatever race is assigned to the calling NPC. This includes races added by mods so a list of possible return values isn't feasible. Scruggs 21:33, 17 May 2008 (EDT)
It does work on dead NPC's as if they were alive.
Dragoon Wraith TALK 21:50, 17 May 2008 (EDT)

I don't really get it. Can anyone give an example on how this funktion works?
Sebb 12:26, 31 August 2008

Sure.
ref Race Begin GameMode if ( Race == 0 ) set Race to player.GetRace elseif ( Race == Imperial ) player.ModActorValue Personality 5 set Race to -1 endif End
The function returns the Race of the actor in a form that can be stored in ref variables, and then you can run checks on the ref. I'm not certain if there are any functions that work with RACE type forms...
Dragoon Wraith TALK 10:30, 31 August 2008 (EDT)
Yes, look under the Actor Functions OBSE Category (can't figure out how to link to that).
The functions there are actually why I requested GetRace in the first place, hehe.
--quetzilla 23:11, 31 August 2008 (EDT)