[Python] Having trouble with onUnitCreated

Discussion in 'Civ4 - SDK/Python' started by 8BitArchitect, Jul 14, 2015.

  1. 8BitArchitect

    8BitArchitect Chieftain

    Joined:
    Sep 12, 2013
    Messages:
    55
    So I've been messing with Promotions & Perks (well, a semi updated version made by Horem) and I've almost got it updated to fully working with BTS 3.19. However, two of the sub modcomps have functions called from onUnitCreated, which doesn't seem to activate at all for me. Anyone have any ideas as to why this is?
     
  2. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Probably because onUnitCreated needs to be activated as a "Python Callback" in the file PythonCallbackDefines.xml by setting the value of USE_ON_UNIT_CREATED_CALLBACK to 1.
     
  3. 8BitArchitect

    8BitArchitect Chieftain

    Joined:
    Sep 12, 2013
    Messages:
    55
    Thank you very much. That fixed it.

    I don't know how many people are still interested in this mod, but after I test it, I'll put it up in the database (and probably do a few tweaks)
     

Share This Page