Results 1 to 6 of 6

Thread: how do I make a unit unavailable as a reward?

  1. #1
    Ikko-Ikki
    Join Date
    Dec 2012
    Posts
    21
    Tournaments Joined
    0
    Tournaments Won
    0

    Default how do I make a unit unavailable as a reward?

    hello,

    I have a custom unit that when created gets destroyed and starts a script. Works great, but just got awarded a bunch of these units in a mission reward so bypassed the script. Is there a way without lowering the price, to make the unit unavailable as a mission reward?

    Thank you

  2. #2
    Withwnar's Avatar Stay Tuned
    Join Date
    Oct 2008
    Posts
    4,314
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: how do I make a unit unavailable as a reward?

    Try giving them the general_unit attribute. It seems to have worked for me with a unit that is only ever spawned. Bear in mind that it will create a general when recruited, though killing this unit will also kill him. From memory you won't get death animations, sounds or messages for him.

    Alternatively, it is possible that the mercenary_unit (?) attribute prevents the mission reward thing too. I haven't tried that myself.

  3. #3
    k/t's Avatar Auxiliarius
    Join Date
    Apr 2009
    Posts
    6,399
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: how do I make a unit unavailable as a reward?

    How does the custom unit get created in the first place? Recruited?

  4. #4
    Ikko-Ikki
    Join Date
    Dec 2012
    Posts
    21
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: how do I make a unit unavailable as a reward?

    thank you,

    adding general_unit worked. I also tried the mercenary_unit but that did not stop it from being a reward.

    the units were recruitable, then destroyed via script.

    thank you again for the timely help.

  5. #5
    k/t's Avatar Auxiliarius
    Join Date
    Apr 2009
    Posts
    6,399
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: how do I make a unit unavailable as a reward?

    Just make sure you put that unit below the one that's the regular general's bodyguard, otherwise all spawned generals will receive the custom unit as bodyguards, as the game only uses the first unit with the general_unit attribute in each faction's roster.

  6. #6
    Ikko-Ikki
    Join Date
    Dec 2012
    Posts
    21
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: how do I make a unit unavailable as a reward?

    Thanks for the heads up. Ill move it to the bottom of the edu.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •