Jump to content

ActorRace scripting


Recommended Posts

For race check, mostly yes. But don't use ' ' or : in the script.

 

 

 

Function CheckRace(Actor akCreatureRef)
    Race myActorsRace = akCreatureRef.GetRace()
    If myActorsRace
         If myActorsRace == MoleratRace
               Debug.Notification("akCreatureRef is a Mole Rat")
         ElseIf myActorsRace == DeathclawRace
               Debug.Notification("akCreatureRef is a Deathclaw")
         ElseIf myActorsRace == CatRace || myActorsRace == AlienRace
               Debug.Notification("akCreatureRef is either a Cat or an Alien.")
         Else
               Debug.Notification("akCreatureRef is not a Mole Rat, not a Deathclaw, not a Cat and not an Alien either but has Race.")
         EndIf
    Else
         Debug.Notification("Error: myActorsRace is None. akCreatureRef has no Race.")
    EndIf
EndFunction

 

 

Edited by LarannKiar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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