Alias.SetFactionRank auto-cast to Actor?

Post » Sat Sep 07, 2013 4:11 am

I'm curious if by modyfing factions, by calling them on alias, am I modyfing alias-factions or actors-factions that are inherited from alias? Are "Alias factions" a simple AddToFaction/RemoveFromFaction equivalents or something more advanced that is hold by alias form separately?

Another question is if by using "Self" variable to call an above functions on script extending ReferenceAlias is it auto-cast to RefAlias or directly to Actor or do I need to cast it to RefAlias then GetReference as Actor?

_MyScript Extends ReferenceAlias ModFactionRank((Self as ReferenceAlias).GetReference as Actor, 1)   ;lol?
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Sat Sep 07, 2013 10:37 am

You should just be just adding/removing/modifying the actor it self with papyrus functions, as they are all actor functions.

As for the Alias Factions, not quite sure but most likely it's not a simple AddToFaction sort of thing. As it's hardcoded into the game, it shouldn't run via papyrus.

As for your script....????? :blink:

Scriptname _test_testscript extends ReferenceAlias    Faction Property SuperCoolFaction AutoFunction SomeFunction()    (GetReference() as Actor).ModFactionRank(SuperCoolFaction, 1)endFunction
User avatar
Wanda Maximoff
 
Posts: 3493
Joined: Mon Jun 12, 2006 7:05 am


Return to V - Skyrim