• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Help me with teleport

Status
Not open for further replies.
Level 2
Joined
Jan 24, 2014
Messages
16
Hello, I need help with one thing. I set teleport for some time.
After 2 minutes, it teleports Blademaster the region, the problem is that if the activated magic mirror image, so it sometimes happens that teleported only his clone, advise me how to make it a premiere destination just a hero, not a clone?
 
Level 2
Joined
Jan 24, 2014
Messages
16
  • Port na event
    • Events
      • Time - SpecialniEvent1 expires
    • Conditions
    • Actions
      • Countdown Timer - Hide LevelTimerOkno
      • Countdown Timer - Hide WaveTimerOkno
      • Countdown Timer - Hide EventTimerOkno
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[1]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[2]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[3]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[4]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[5]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[6]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[7]))
      • Unit - Reset ability cooldowns for (Random unit from (Units of type Hrdinove[8]))
      • Set ON = True
      • Wait 5.00 seconds
      • Sound - Set music volume to 0.00%
      • Sound - Play PH1 <gen>
      • Unit - Move (Random unit from (Units owned by Player 1 (Red) of type Hrdinove[1])) instantly to (Center of Event Hrac 1 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 2 (Blue) of type Hrdinove[2])) instantly to (Center of Event Hrac 2 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 3 (Teal) of type Hrdinove[3])) instantly to (Center of Event Hrac 3 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 4 (Purple) of type Hrdinove[4])) instantly to (Center of Event Hrac 4 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 5 (Yellow) of type Hrdinove[5])) instantly to (Center of Event Hrac 5 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 6 (Orange) of type Hrdinove[6])) instantly to (Center of Event Hrac 6 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 7 (Green) of type Hrdinove[7])) instantly to (Center of Event hrac 7 <gen>)
      • Unit - Move (Random unit from (Units owned by Player 8 (Pink) of type Hrdinove[8])) instantly to (Center of Event Hrac 1 <gen>)
      • Camera - Pan camera for Player 1 (Red) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 3 (Teal) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 4 (Purple) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 5 (Yellow) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 6 (Orange) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 7 (Green) to (Center of Event STRED <gen>) over 0.00 seconds
      • Camera - Pan camera for Player 8 (Pink) to (Center of Event STRED <gen>) over 0.00 seconds
Hero select :
  • Vybrani 1 Normal
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • P01_PickedHero Equal to False
          • Or - Any (Conditions) are true
            • Conditions
              • (Triggering unit) Equal to Priestess of the Moon 0072 <gen>
              • (Triggering unit) Equal to Demon Hunter 0073 <gen>
              • (Triggering unit) Equal to Warden 0074 <gen>
              • (Triggering unit) Equal to Paladin 0075 <gen>
              • (Triggering unit) Equal to Archmage 0076 <gen>
              • (Triggering unit) Equal to Mountain King 0077 <gen>
              • (Triggering unit) Equal to Blood Mage 0078 <gen>
              • (Triggering unit) Equal to Blademaster 0079 <gen>
              • (Triggering unit) Equal to Tauren Chieftain 0080 <gen>
              • (Triggering unit) Equal to Shadow Hunter 0081 <gen>
              • (Triggering unit) Equal to Lich 0082 <gen>
              • (Triggering unit) Equal to Dreadlord 0083 <gen>
              • (Triggering unit) Equal to Crypt Lord 0084 <gen>
              • (Triggering unit) Equal to Warlock 0085 <gen>
              • (Triggering unit) Equal to Archmage 0086 <gen>
              • (Triggering unit) Equal to Dryad 0087 <gen>
              • (Triggering unit) Equal to Huntress 0088 <gen>
              • (Triggering unit) Equal to Knight (wielding Frostmourne) 0089 <gen>
              • (Triggering unit) Equal to Ranger 0090 <gen>
              • (Triggering unit) Equal to Sorceress 0091 <gen>
              • (Triggering unit) Equal to Marine 0210 <gen>
              • (Triggering unit) Equal to Rifleman 0211 <gen>
              • (Triggering unit) Equal to Ghost 0212 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to P01_LoadHero
        • Then - Actions
          • Set P01_PickedHero = True
          • Camera - Pan camera for Player 1 (Red) to (Center of Start <gen>) over 0.00 seconds
          • Set AutoOpen = (AutoOpen + 1)
          • Set Qtrue[1] = True
          • Set Hrdinove[1] = (Unit-type of (Triggering unit))
        • Else - Actions
          • Set P01_LoadHero = (Triggering unit)
 
This is a teleport system? :O

You have memory leaks - read about it, you find link in my signature.

I think your problem might be that you use "RandomUnit from Player 1". So it also might be an illusion.

best would to set heroes in variables. For example:

Set Hero[1] = Player 1's hero
Set Hero[2] = Player 2's hero

And later you can move Hero[PlayerNumberof(Player)]

But if you have problems with it you also could filter it with:

Pick every units owned by Player 1 and do multiple actions.... (and then filter with If/then/else if picked unit is your hero)

But this is less efficient since you also check all other units, and my example leaks (read above)
 
If you want to set your heroes in variables you can do this:

  • Set Hero[1] = Blademaster 0000 // Player 1's hero
  • Set Hero[2] = Blademaster 0001 // Player 2's hero
  • Set Hero[3] = Blademaster 0002 // Player 3's hero
  • Unit - Move Hero[1] instantly to (Center of Event Hrac 1 <gen>)
  • Unit - Move Hero[2] instantly to (Center of Event Hrac 2 <gen>)
  • Unit - Move Hero[3] instantly to (Center of Event Hrac 3 <gen>)
  • .....
Or an optimized way with unit variable is also to store all "Center of Event Hrac" into varibales and then make a loop:

  • Set Hrac[1] = (Center of Event Hrac 1 <gen>)
  • Set Hrac[2] = (Center of Event Hrac 2 <gen>)
  • Set Hrac[2] = (Center of Event Hrac 3 <gen>)
  • ...
  • For each Integer I from to 8 do Actions:
    • Unit - Move Hero[I] instantly to Hrac[I]
Loops can make your life easy.
_______________________________________

I would do like I expalined above but I will also explain this other (worse) way.

  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit owned by Player 1 and do actions:
    • If - Conditions
      • UnitType of PickedUnit == Blademaster
    • Then - Actions
      • Unit - Move Picked Unit to (Center of Event Hrac 1 <gen>)
You can do this for every player or one loop from 1-8 as I did above, just with Unit Group.

"Custom script: set bj_wantDestroyGroup = true" is to clean memory leak. There is a link in my signature if you want to know more about it.
_________________________________________

Hope it helped you know.. and btw you have a little fail in one line:
  • Unit - Move (Random unit from (Units owned by Player 8 (Pink) of type Hrdinove[8])) instantly to (Center of Event Hrac 1 <gen>)
^Should be (Center of Event Hrac 8 <gen>).

And you should learn to use loops, I see they could simplify your trigger a lot.

Read this tutorial, it might help you: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/things-gui-user-should-know-233242/
 
Status
Not open for further replies.
Top