1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Random Unit spawning on death (TFT)

Discussion in 'Triggers & Scripts' started by thetracker3, Aug 29, 2013.

  1. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    You don't have them set in the unit type array....
    look at the setup trigger i posted above.
     
  2. pOke

    pOke

    Joined:
    Mar 24, 2013
    Messages:
    1,104
    Resources:
    1
    Maps:
    1
    Resources:
    1
    It works fine on Map Init you just made a small error, it should be.

    • Actions
      • Set unitTypesMaxIndex[1] = Blood soul
      • Set unitTypesMaxIndex[2] = Mind soul
      • Set unitTypesMaxIndex[3] = Body soul
      • Set unitTypeMaxIndex = 3
     
  3. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    Thanks poke.
     
  4. thetracker3

    thetracker3

    Joined:
    Jun 25, 2009
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Well, if I set unitTypeMaxIndex to a Unit-Type variable I can't have "set unitTypeMaxIndex = 3" as a valid trigger. 3 has to be a unit, and I have to have an index number after unitTypeMaxIndex.

    But if I set it to an integer variable, I can have "Set unitTypeMaxIndex = 3" but then I can't have "set unitTypeMaxIndex[1] = Blood Soul".

    So the problem remains, what type of variable do I have it set to, and how to I get it to do the rest of the stuff?
     
  5. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    poke made a simple mistake it should be this.

    i posted this above. please read.

    Here is the setup trigger
    • map init
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Set unitTypeArray[1] = Peasant
        • Set unitTypeArray[2] = Footman
        • Set unitTypeArray[3] = Knight
        • Set unitTypeArray[4] = Rifleman
        • Set unitTypeArray[5] = Mortar Team
        • Set untTypeMaxIndex = 5
     
  6. thetracker3

    thetracker3

    Joined:
    Jun 25, 2009
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Holy cow that was difficult. Its working now. How in Illidan's name was that so hard? Seriously... Was it just our clashing thoughts that caused us to get so confused?
     
  7. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    Lol i wasn't confused. Glad you got it to work tho.
     
  8. thetracker3

    thetracker3

    Joined:
    Jun 25, 2009
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Yeah, of course you weren't confused... that's why we got it done so quickly. :xxd: Its all good now. Thanks for the help everyone!
     
  9. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    Lol. No problem bud glad you got it to work.