1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Making a bot character spawn as male or female

Discussion in 'Modding Help' started by Frikman, Jul 19, 2016.

  1. Frikman

    Frikman Bison Rider

    Messages:
    162
    So, I have two different sprites for a character.

    [​IMG] [​IMG]
    And I added the following line to at the beggining of the anim script for the character.
    Code:
    void onInit(CSprite@ this)
    {
        const string texname = this.getBlob().getSexNum() == 0 ?
                               "../Mods/ZFM+1.3.2/Entites/Characters/Mage/MageMale.png" :
                               "../Mods/ZFM+1.3.2/Entites/Characters/Mage/MageFemale.png";
        this.ReloadSprite(texname);
    }
    
    Yet when I create the character in game, only the male version spawns. Do I have to modify other files for the game to randomly spawn the character as female? I believe Migrants spawn as both male and female, but for this mage it doesn't work.

    [​IMG]