Results 1 to 5 of 5

Thread: Scripting a unit to change to another EDU entry based on experience level

  1. #1
    Reiksfart's Avatar Princeps
    Join Date
    Apr 2010
    Posts
    1,002
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Scripting a unit to change to another EDU entry based on experience level

    Has anything like this been tried before, or is it even possible?

  2. #2
    FortressofRain's Avatar Shisai
    Join Date
    May 2006
    Posts
    377
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Scripting a unit to change to another EDU entry based on experience level

    I know you can make a script to destroy one unit and spawn another unit at the same location, such as with the Kalmirr Union event/emerging faction. I suppose you could script to destroy one unit when it reaches a certain experience lvl, and then script a different unit to spawn at some location. As far as the EDU is concerned, 2 different entries count as 2 different units and towards the hardcode limit of 500 units. But if you have the space, you can make as many copies of a certain unit as you want and edit the stats to be different for each entry. Then script one unit to be destroyed, and another unit to appear, simulating the unit changing into another. But the problem is that I don't think it is possible to spawn a unit where a specific unit died. I think the best you can do is the nearest city or named character, though I am not certain of this.

    However, if you are playing a mod with near or at 500 EDU units, you will have to delete a few to make room for new ones.

  3. #3
    KEA's Avatar Hastatus
    Join Date
    Apr 2012
    Posts
    560
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Scripting a unit to change to another EDU entry based on experience level

    Quote Originally Posted by Reiksfart View Post
    Has anything like this been tried before, or is it even possible?
    Not possible. It is not possible to check for the experience level of a unit by script (not even a general's bodyguard), to start with.

  4. #4
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,749
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Scripting a unit to change to another EDU entry based on experience level

    It's also not possible to destroy one single unit

  5. #5
    Gigantus's Avatar When I get old, I'm going to move in with my kids, hog the computer, pay no bills, eat all the food, trash the house, and when asked to clean, pitch a fit like it's killing me!
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    33,085
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Scripting a unit to change to another EDU entry based on experience level

    Isn't the Marian Reform changing bodyguards? Or did that only apply for new units with bodyguards?

    Otherwise it's not possible.
    .

    Member of the H.E.L.P. Project

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
  •