Jump to content

[LE] problem with GetSex, help please!


myav

Recommended Posts

if i'll summon bandits through console (player.placeatme 00037bfc as example) ===> all works and i receive ingame messages:

 

checkname launched

bandit detected, now check sex

sex female detected

 

But!....

 

If i'll meet the same bandits in the world (without console), i receive messages:

 

checkname launched

bandit detected, now check sex

sex 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 by myav
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

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