myav Posted August 4, 2020 Share Posted August 4, 2020 (edited) if i'll summon bandits through console (player.placeatme 00037bfc as example) ===> all works and i receive ingame messages: checkname launchedbandit detected, now check sexsex female detected But!.... If i'll meet the same bandits in the world (without console), i receive messages: checkname launchedbandit detected, now check sexsex female NOT detected What is wrong? Why GetSex works vs NPC summoned through console but don't work vs NPC whom i meet in the game ? How to fix this ? standart cloak => OnEffectStart => CheckWho() Function CheckWho () ActorBase UCM_TempBase = selfactor.GetActorBase() string TempName=selfactor.GetDisplayName() int MySex = UCM_TempBase.GetSex() .... if(selfactor.IsInFaction(BanditFaction)) CheckName() debug.notification("checkname launched") if (FinalName=="-63z-32z-19z-28z-24z-14z0z0z0z0z0z0") debug.notification("bandit detected, now check sex") if MySex == 1 debug.notification("sex female detected") TempName="changed name" else debug.notification("sex female NOT detected") endif Edited August 4, 2020 by myav Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 4, 2020 Share Posted August 4, 2020 When you console in an actor you are using the actor's form ID.When you encounter most non-unique actors in-game they are pulled from a leveled actor list and as such GetActorBase does not return what you would expect. Use GetLeveledActorBase instead. It will return the temporary actorbase for that actor. In cases where the actor did not come from a leveled list, it will pull the same thing as GetActorBase. Link to comment Share on other sites More sharing options...
myav Posted August 4, 2020 Author Share Posted August 4, 2020 IsharaMeradin, thanks! Problem solved :-P Link to comment Share on other sites More sharing options...
Recommended Posts