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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

All hero teleport

Discussion in 'World Editor Help Zone' started by Spo, Oct 7, 2009.

  1. Spo

    Spo

    Joined:
    Jun 1, 2009
    Messages:
    116
    Resources:
    0
    Resources:
    0
    SOrry for all the ?s but i need another is there a trigger that if you kill a unit all palyer heor tele to a loctaion
     
  2. Dark_hunter4

    Dark_hunter4

    Joined:
    Sep 27, 2009
    Messages:
    93
    Resources:
    0
    Resources:
    0
    If your heroes are created VIA triggers you might want to use a variable (can be an array - Unit) for those each time a hero is created. For each player when they get a unit use the Set Variable: Last Created unit trigger. If you have arrays its Set Variable [Index] : Last Created unit and such. Then you can make a trigger to move all the variable units to the location of your desire.

    Assuming you have the hero selection with units and circles and stuff:
    • A Trigger:
    • Events: Unit enters Starting Area
    • Conditions: Owner of Entering Unit equal to Player 1
    • Actions: Set Player 1 Hero to Entering Unit


    Starting Area being a region, Entering unit being the unit that just was created and entered the area, Player 1 Hero being the variable used to store the unit.

    Now to move.
    • Move:
    • Events: A unit dies.
    • Events: (Your unit) dies.
    • Conditions: Dying unit is equal to (your unit)
    • Actions: Move (use hero varriables here) to (point of desired teleportation)


    Note: The second Events on the second trigger is Unit Specific and requires no Condition.
     
    Last edited: Oct 7, 2009
  3. Shendoo2

    Shendoo2

    Joined:
    Aug 1, 2008
    Messages:
    464
    Resources:
    0
    Resources:
    0
    • Hero teleport
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Dying unit)) Equal to Footman
      • Actions
        • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Owner of (Picked unit)) controller) Equal to User
              • Then - Actions
                • Unit - Move (Picked unit) instantly to (Center of (Playable map area))
              • Else - Actions
     
  4. Dark_hunter4

    Dark_hunter4

    Joined:
    Sep 27, 2009
    Messages:
    93
    Resources:
    0
    Resources:
    0
    Yeah... that does it up alot better and is cleaner... been a while since I've actually triggered, mostly working on my terraining skills. :hohum:
     
  5. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    matching (((Picked unit) is a hero... -> matching (matching unit) is a hero...

    And it leaks a location + unit group.
     
  6. Squiggy

    Squiggy

    Joined:
    Mar 25, 2008
    Messages:
    2,604
    Resources:
    18
    Maps:
    2
    Spells:
    15
    Tutorials:
    1
    Resources:
    18
    Adding the ((Owner of (Picked unit)) controller) Equal to User to the main condition withing the unit group action would save you space
     
  7. Spo

    Spo

    Joined:
    Jun 1, 2009
    Messages:
    116
    Resources:
    0
    Resources:
    0
    no you teleport win you kill a unit (boss)
     
  8. swipe5weep

    swipe5weep

    Joined:
    Mar 22, 2009
    Messages:
    273
    Resources:
    0
    Resources:
    0
    try this

    • tele hero
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Dying unit)) Equal to YOURBOSS
      • Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
          • Loop - Actions
            • Unit - Move (Picked unit) instantly to YOURLOCATION