• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Portal 1.2 (nice looking)

This is the sample of nice looking portal (no import)
Can be used as a Spell or constant Portal.

Decription: create 2 portals at caster and target locations.
Any Unit entered Portal, activate it, Portal begins to shrink, then Move Unit Instantly or Transform Unit to Energy Bird and send it. Portal take few second to get starting state and then ready for another customers.

Update: added ability to transform unit to "Energy Bird" and Move it NOT instantly.

MUI/GUI
Used indexing template by Hanky, thank to him.

  • Actions
    • Set TP_A_point_destination = (Position of (Triggering unit))
    • Set TP_A_point_create = (Target point of ability being cast)
    • Trigger - Run TP Create <gen> (ignoring conditions)
  • Actions
    • -------- for easy usage, all the variables that can be EDITED, named with capital letters prefix --------
    • -------- TP_A_etc... --------
    • -------- TP_E_etc... --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- Owner of portal, by default it's "Neutral Passive" --------
    • Set TP_A_player = (Owner of (Triggering unit))
    • -------- Point where is portal will be created --------
    • Set TP_A_point_create = (Position of (Triggering unit))
    • -------- Point is where to portal will move units --------
    • Set TP_A_point_destination = (Target point of ability being cast)
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- Expiration timer, when it expires portal will be destroyed. By default it's 0.00 (infinity last) --------
    • Set TP_A_time_life = 20.00
    • -------- Time before portal will be created --------
    • Set TP_A_time_before_created = 0.00
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- that's variable allow units to move throught portals in two directions --------
    • Set TP_A_two_directions = True
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- the trigger size of portal, range in which unit must come to activate portal --------
    • Set TP_A_size = 80.00
    • -------- Height of portal --------
    • Set TP_A_height_max = 250.00
    • Set TP_A_height_min = 80.00
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- the time is taken to play 'CLOSE' portal animation --------
    • Set TP_A_time_closing = 1.50
    • -------- the time is taken to play 'OPEN' portal animation --------
    • Set TP_A_time_opening = 1.00
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- effects --------
    • Set TP_E_eff_unit_move = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
    • Set TP_E_eff_unit_move2 = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    • Set TP_E_eff_create_start = Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
    • Set TP_E_eff_create_finish = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    • Set TP_E_eff_dissapear_start = Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
    • Set TP_E_eff_dissapear_finish = Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
    • Set TP_E_eff_constant = <Empty String>
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- Run trigger to create portal --------
    • Trigger - Run TP Create <gen> (ignoring conditions)
  • Actions
    • -------- Turn the DynLoop trigger on. --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • DL_i_last Equal to 0
      • Then - Actions
        • Trigger - Turn on TP Loop <gen>
      • Else - Actions
    • -------- Increase the index size --------
    • Set DL_i_last = (DL_i_last + 1)
    • -------- Dynamic Index --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • DL_i_last Greater than DL_Max_Size
      • Then - Actions
        • Set DL_i[DL_i_last] = DL_i_last
        • Set DL_Max_Size = DL_i_last
      • Else - Actions
    • -------- Dynamic Index End --------
    • Set TP_index = DL_i[DL_i_last]
    • -------- Setup those arrays --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Special Effect - Create a special effect at TP_A_point_create using TP_E_eff_create_start
    • Special Effect - Destroy (Last created special effect)
    • Special Effect - Create a special effect at TP_A_point_destination using TP_E_eff_create_start
    • Special Effect - Destroy (Last created special effect)
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Set TP_time_before_create_ex[TP_index] = TP_A_time_before_created
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • TP_A_time_before_created Not equal to 0.00
      • Then - Actions
        • Set TP_portal_created_ex[TP_index] = False
        • -------- --------------------------- --------
        • Set TP_x1[TP_index] = (X of TP_A_point_create)
        • Set TP_x2[TP_index] = (X of TP_A_point_destination)
        • Set TP_y1[TP_index] = (Y of TP_A_point_create)
        • Set TP_y2[TP_index] = (Y of TP_A_point_destination)
        • -------- --------------------------- --------
      • Else - Actions
        • Set TP_portal_created_ex[TP_index] = True
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • -------- 1st one, top --------
        • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_create facing 0.00 degrees
        • Set TP_t_top[TP_index] = (Last created unit)
        • Animation - Change (Last created unit) flying height to TP_A_height_max at 250.00
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • -------- 2nd one, bottom --------
        • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_create facing 0.00 degrees
        • Set TP_t_bottom[TP_index] = (Last created unit)
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • -------- 3rd one, top --------
        • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_destination facing 0.00 degrees
        • Set TP_t_top2[TP_index] = (Last created unit)
        • Animation - Change (Last created unit) flying height to TP_A_height_max at 250.00
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • -------- 4nd one, bottom --------
        • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_destination facing 0.00 degrees
        • Set TP_t_bottom2[TP_index] = (Last created unit)
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • Animation - Change TP_t_bottom[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        • Animation - Change TP_t_bottom2[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        • Animation - Change TP_t_top[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        • Animation - Change TP_t_top2[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        • -------- --------------------------- --------
        • -------- --------------------------- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TP_E_eff_constant Not equal to <Empty String>
          • Then - Actions
            • Special Effect - Create a special effect at TP_A_point_create using TP_E_eff_constant
            • Set TP_E_eff_constant_ex[TP_index] = (Last created special effect)
            • Special Effect - Create a special effect at TP_A_point_destination using TP_E_eff_constant
            • Set TP_E_eff_constant_ex2[TP_index] = (Last created special effect)
          • Else - Actions
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- --------------------------- --------
    • Set TP_player_ex[TP_index] = TP_A_player
    • -------- --------------------------- --------
    • If (TP_A_time_life Equal to 0.00) then do (Set TP_A_infinity_longs[TP_index] = True) else do (Set TP_time_life_ex[TP_index] = TP_A_time_life)
    • -------- --------------------------- --------
    • Set TP_life_timer_is_expired[TP_index] = False
    • Set TP_t_activated[TP_index] = False
    • Set TP_t_is_busy1[TP_index] = True
    • Set TP_t_is_busy2[TP_index] = True
    • Set TP_t_unbusy1[TP_index] = True
    • Set TP_t_unbusy_timer1[TP_index] = TP_A_time_opening
    • Set TP_two_directions_ex[TP_index] = TP_A_two_directions
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Set TP_time_closing_ex[TP_index] = TP_A_time_closing
    • Set TP_time_opening_ex[TP_index] = TP_A_time_opening
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Set TP_size_ex[TP_index] = TP_A_size
    • Set TP_height_max_ex[TP_index] = TP_A_height_max
    • Set TP_height_min_ex[TP_index] = TP_A_height_min
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Set TP_E_eff_unit_move_ex[TP_index] = TP_E_eff_unit_move
    • Set TP_E_eff_unit_move2_ex[TP_index] = TP_E_eff_unit_move2
    • Set TP_E_eff_create_start_ex[TP_index] = TP_E_eff_create_start
    • Set TP_E_eff_create_finish_ex[TP_index] = TP_E_eff_create_finish
    • Set TP_E_eff_dissapear_start_ex[TP_index] = TP_E_eff_dissapear_start
    • Set TP_E_eff_dissapear_finish_ex[TP_index] = TP_E_eff_dissapear_finish
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • Custom script: call RemoveLocation (udg_TP_A_point_create)
    • Custom script: call RemoveLocation (udg_TP_A_point_destination)
    • -------- ------------------------------------------------------------------------------------------------------------ --------
    • -------- Nullification for default variables --------
    • Set TP_A_player = Neutral Passive
    • Set TP_A_time_life = 0.00
    • Set TP_A_time_before_created = 0.00
    • Set TP_A_two_directions = True
    • Set TP_A_size = 80.00
    • Set TP_A_time_opening = 1.50
    • Set TP_A_time_closing = 1.00
    • Set TP_A_height_min = 90.00
    • Set TP_A_height_max = 250.00
    • Set TP_E_eff_constant = <Empty String>
    • Set TP_E_eff_unit_move = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
    • Set TP_E_eff_unit_move2 = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    • Set TP_E_eff_create_start = Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
    • Set TP_E_eff_create_finish = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    • Set TP_E_eff_dissapear_start = Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
    • Set TP_E_eff_dissapear_finish = Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
  • Events
    • Time - Every 0.05 seconds of game time
  • Actions
    • For each (Integer DL_TEMP_LOOP) from 1 to DL_i_last, do (Actions)
      • Loop - Actions
        • Set TP_index = DL_i[DL_TEMP_LOOP]
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TP_portal_created_ex[TP_index] Equal to False
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • TP_time_before_create_ex[TP_index] Less than or equal to 0.00
              • Then - Actions
                • Set TP_portal_created_ex[TP_index] = True
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • Set TP_A_point_create = (Point(TP_x1[TP_index], TP_y1[TP_index]))
                • Set TP_A_point_destination = (Point(TP_x2[TP_index], TP_y2[TP_index]))
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • Special Effect - Create a special effect at TP_A_point_create using TP_E_eff_create_finish_ex[TP_index]
                • Special Effect - Destroy (Last created special effect)
                • Special Effect - Create a special effect at TP_A_point_destination using TP_E_eff_create_finish_ex[TP_index]
                • Special Effect - Destroy (Last created special effect)
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • -------- 1st one, top --------
                • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_create facing 0.00 degrees
                • Set TP_t_top[TP_index] = (Last created unit)
                • Animation - Change (Last created unit) flying height to TP_A_height_max at 250.00
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • -------- 2nd one, bottom --------
                • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_create facing 0.00 degrees
                • Set TP_t_bottom[TP_index] = (Last created unit)
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • -------- 3rd one, top --------
                • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_destination facing 0.00 degrees
                • Set TP_t_top2[TP_index] = (Last created unit)
                • Animation - Change (Last created unit) flying height to TP_A_height_max at 250.00
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • -------- 4nd one, bottom --------
                • Unit - Create 1 TP_dummy_type for TP_A_player at TP_A_point_destination facing 0.00 degrees
                • Set TP_t_bottom2[TP_index] = (Last created unit)
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • -------- --------------------------- --------
                • Animation - Change TP_t_bottom[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                • Animation - Change TP_t_bottom2[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                • Animation - Change TP_t_top[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                • Animation - Change TP_t_top2[TP_index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                • -------- ------------------------------------------------------------------------------------------------------------ --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • TP_E_eff_constant Not equal to <Empty String>
                  • Then - Actions
                    • Special Effect - Create a special effect at TP_A_point_create using TP_E_eff_constant
                    • Set TP_E_eff_constant_ex[TP_index] = (Last created special effect)
                    • Special Effect - Create a special effect at TP_A_point_destination using TP_E_eff_constant
                    • Set TP_E_eff_constant_ex2[TP_index] = (Last created special effect)
                  • Else - Actions
                • -------- ------------------------------------------------------------------------------------------------------------ --------
                • Custom script: call RemoveLocation (udg_TP_A_point_create)
                • Custom script: call RemoveLocation (udg_TP_A_point_destination)
                • -------- ------------------------------------------------------------------------------------------------------------ --------
              • Else - Actions
                • Set TP_time_before_create_ex[TP_index] = (TP_time_before_create_ex[TP_index] - TP_loop_interval)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • TP_t_top[TP_index] Not equal to No unit
              • Then - Actions
                • Set TP_point_temp = (Position of TP_t_top[TP_index])
                • Set TP_point_temp2 = (Position of TP_t_top2[TP_index])
                • -------- ------------------------------------------------------------------------------------------------------------ --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • TP_portal_created_ex[TP_index] Equal to True
                  • Then - Actions
                    • -------- --------------------Is portal busy now?--------------------------------------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • TP_t_unbusy1[TP_index] Equal to True
                      • Then - Actions
                        • Set TP_t_unbusy_timer1[TP_index] = (TP_t_unbusy_timer1[TP_index] - TP_loop_interval)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_t_unbusy_timer1[TP_index] Less than or equal to 0.00
                          • Then - Actions
                            • Set TP_t_is_busy1[TP_index] = False
                            • Set TP_t_unbusy1[TP_index] = False
                            • If (TP_two_directions_ex[TP_index] Equal to True) then do (Set TP_t_is_busy2[TP_index] = False) else do (Do nothing)
                          • Else - Actions
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_t_unbusy2[TP_index] Equal to True
                          • Then - Actions
                            • Set TP_t_unbusy_timer2[TP_index] = (TP_t_unbusy_timer2[TP_index] - TP_loop_interval)
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • TP_t_unbusy_timer2[TP_index] Less than or equal to 0.00
                              • Then - Actions
                                • Set TP_t_is_busy1[TP_index] = False
                                • Set TP_t_is_busy2[TP_index] = False
                                • Set TP_t_unbusy2[TP_index] = False
                              • Else - Actions
                          • Else - Actions
                    • -------- ------------------------------------------------------------------------------------------------------------ --------
                    • -------- --------------------Is portal have expiration timer?--------------------------------------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • TP_A_infinity_longs[TP_index] Equal to False
                      • Then - Actions
                        • Set TP_time_life_ex[TP_index] = (TP_time_life_ex[TP_index] - TP_loop_interval)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_time_life_ex[TP_index] Less than or equal to 0.00
                            • TP_life_timer_is_expired[TP_index] Equal to False
                          • Then - Actions
                            • Set TP_life_timer_is_expired[TP_index] = True
                            • Set TP_t_activated[TP_index] = True
                            • Set TP_time_to_move[TP_index] = TP_time_closing_ex[TP_index]
                            • -------- ------------------------------------------------------------------------------------------------------------ --------
                            • -------- ----------------------------------------------------Close------------------------------------ --------
                            • Animation - Change TP_t_top[TP_index] flying height to 50.00 at 400.00
                            • Animation - Change TP_t_top2[TP_index] flying height to 50.00 at 400.00
                            • -------- ------------------------------------------------------------------------------------------------------------ --------
                            • Special Effect - Create a special effect at TP_point_temp using TP_E_eff_dissapear_start_ex[TP_index]
                            • Special Effect - Destroy (Last created special effect)
                            • Special Effect - Create a special effect at TP_point_temp2 using TP_E_eff_dissapear_start_ex[TP_index]
                            • Special Effect - Destroy (Last created special effect)
                          • Else - Actions
                      • Else - Actions
                    • -------- ------------------------------------------------------------------------------------------------------------ --------
                    • -------- --------------------Move portal top down--------------------------------------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • TP_t_activated[TP_index] Equal to True
                      • Then - Actions
                        • -------- --------------------Portal is on "close" animation (activated)--------------------------------------- --------
                        • Set TP_time_to_move[TP_index] = (TP_time_to_move[TP_index] - TP_loop_interval)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_time_to_move[TP_index] Less than or equal to 0.00
                          • Then - Actions
                            • -------- --------------------Portal "closed"--------------------------------------- --------
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • TP_life_timer_is_expired[TP_index] Equal to False
                              • Then - Actions
                                • -------- --------------------Now, move units--------------------------------------- --------
                                • Set TP_move_units_now[TP_index] = True
                                • Set TP_t_activated[TP_index] = False
                                • -------- ------------------------------------------------------------------------------------------------------------ --------
                                • -------- ------------------------------------------------Open----------------------------------------- --------
                                • Set TP_speed = ((TP_height_max_ex[TP_index] - TP_height_min_ex[TP_index]) / TP_time_opening_ex[TP_index])
                                • Animation - Change TP_t_top[TP_index] flying height to TP_height_max_ex[TP_index] at TP_speed
                                • Animation - Change TP_t_top2[TP_index] flying height to TP_height_max_ex[TP_index] at TP_speed
                              • Else - Actions
                                • -------- --------------------Expiration timer is left, remove portal--------------------------------------- --------
                                • -------- ------------------------------------------------------------------------------------------------------------ --------
                                • Unit - Remove TP_t_top[TP_index] from the game
                                • Unit - Remove TP_t_top2[TP_index] from the game
                                • Unit - Remove TP_t_bottom[TP_index] from the game
                                • Unit - Remove TP_t_bottom2[TP_index] from the game
                                • -------- ------------------------------------------------------------------------------------------------------------ --------
                                • Special Effect - Create a special effect at TP_point_temp using TP_E_eff_dissapear_finish_ex[TP_index]
                                • Special Effect - Destroy (Last created special effect)
                                • Special Effect - Create a special effect at TP_point_temp2 using TP_E_eff_dissapear_finish_ex[TP_index]
                                • Special Effect - Destroy (Last created special effect)
                                • -------- ------------------------------------------------------------------------------------------------------------ --------
                                • Special Effect - Destroy TP_E_eff_constant_ex[TP_index]
                                • Special Effect - Destroy TP_E_eff_constant_ex2[TP_index]
                                • -------- ------------------------------------------------------------------------------------------------------------ --------
                                • -------- RecycleIndex --------
                                • Set DL_i[DL_TEMP_LOOP] = DL_i[DL_i_last]
                                • Set DL_i[DL_i_last] = TP_index
                                • Set DL_i_last = (DL_i_last - 1)
                                • Set DL_TEMP_LOOP = (DL_TEMP_LOOP - 1)
                                • -------- Turn the trigger again off if the index_size is below 0... --------
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • DL_i_last Equal to 0
                                  • Then - Actions
                                    • Trigger - Turn off (This trigger)
                                    • Skip remaining actions
                                  • Else - Actions
                            • -------- ------------------------------------------------------------------------------------------------------------ --------
                          • Else - Actions
                      • Else - Actions
                        • Set TP_move_units_now[TP_index] = False
                    • -------- ------------------------------------------------------------------------------------------------------------ --------
                    • -------- --------------------Move units (If portal is closed) --------------------------------------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • TP_life_timer_is_expired[TP_index] Equal to False
                      • Then - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_t_is_busy1[TP_index] Equal to False
                          • Then - Actions
                            • Custom script: set bj_wantDestroyGroup = true
                            • Unit Group - Pick every unit in (Units within TP_size_ex[TP_index] of TP_point_temp matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))) and do (Actions)
                              • Loop - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • Or - Any (Conditions) are true
                                      • Conditions
                                        • TP_player_ex[TP_index] Equal to Neutral Passive
                                        • ((Owner of (Picked unit)) is an ally of TP_player_ex[TP_index]) Equal to True
                                  • Then - Actions
                                    • -------- --------------------Unit is an ally, or its just a Neutrall Portal (work for everyone)--------------------------------------- --------
                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • TP_move_units_now[TP_index] Equal to True
                                      • Then - Actions
                                        • -------- --------------------MOVE UNITS--------------------------------------- --------
                                        • Unit - Move (Picked unit) instantly to TP_point_temp2
                                        • Special Effect - Create a special effect attached to the origin of (Picked unit) using TP_E_eff_unit_move_ex[TP_index]
                                        • Special Effect - Destroy (Last created special effect)
                                        • Special Effect - Create a special effect attached to the origin of (Picked unit) using TP_E_eff_unit_move2_ex[TP_index]
                                        • Special Effect - Destroy (Last created special effect)
                                      • Else - Actions
                                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • TP_t_activated[TP_index] Equal to False
                                          • Then - Actions
                                            • -------- --------------------UNITS INSIDE, ACTIVATE PORTAL--------------------------------------- --------
                                            • Set TP_turn_on[TP_index] = True
                                            • Set TP_t_activated[TP_index] = True
                                            • Set TP_t_is_busy2[TP_index] = True
                                          • Else - Actions
                                  • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • TP_move_units_now[TP_index] Equal to True
                              • Then - Actions
                                • -------- --------------------MOVE UNITS--------------------------------------- --------
                                • Set TP_t_is_busy1[TP_index] = True
                                • Set TP_t_unbusy1[TP_index] = True
                                • Set TP_t_unbusy_timer1[TP_index] = 1.25
                              • Else - Actions
                          • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_t_is_busy2[TP_index] Equal to False
                          • Then - Actions
                            • Custom script: set bj_wantDestroyGroup = true
                            • Unit Group - Pick every unit in (Units within TP_size_ex[TP_index] of TP_point_temp2 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))) and do (Actions)
                              • Loop - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • Or - Any (Conditions) are true
                                      • Conditions
                                        • TP_player_ex[TP_index] Equal to Neutral Passive
                                        • ((Owner of (Picked unit)) is an ally of TP_player_ex[TP_index]) Equal to True
                                  • Then - Actions
                                    • -------- --------------------Unit is an ally, or its just a Neutrall Portal (work for everyone)--------------------------------------- --------
                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • TP_move_units_now[TP_index] Equal to True
                                      • Then - Actions
                                        • -------- --------------------MOVE UNITS--------------------------------------- --------
                                        • Unit - Move (Picked unit) instantly to TP_point_temp
                                        • Special Effect - Create a special effect attached to the origin of (Picked unit) using TP_E_eff_unit_move_ex[TP_index]
                                        • Special Effect - Destroy (Last created special effect)
                                        • Special Effect - Create a special effect attached to the origin of (Picked unit) using TP_E_eff_unit_move2_ex[TP_index]
                                        • Special Effect - Destroy (Last created special effect)
                                      • Else - Actions
                                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • TP_t_activated[TP_index] Equal to False
                                          • Then - Actions
                                            • -------- --------------------UNITS INSIDE, ACTIVATE PORTAL--------------------------------------- --------
                                            • Set TP_turn_on[TP_index] = True
                                            • Set TP_t_activated[TP_index] = True
                                            • Set TP_t_is_busy1[TP_index] = True
                                          • Else - Actions
                                  • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • TP_move_units_now[TP_index] Equal to True
                              • Then - Actions
                                • -------- --------------------MOVE UNITS--------------------------------------- --------
                                • Set TP_t_is_busy2[TP_index] = True
                                • Set TP_t_unbusy2[TP_index] = True
                                • Set TP_t_unbusy_timer2[TP_index] = 1.25
                              • Else - Actions
                          • Else - Actions
                      • Else - Actions
                    • -------- ------------------------------------------------------------------------------------------------------------ --------
                    • -------- --------------------Get started --------------------------------------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • TP_turn_on[TP_index] Equal to True
                      • Then - Actions
                        • -------- --------------------Begin "close" animation--------------------------------------- --------
                        • Set TP_turn_on[TP_index] = False
                        • Set TP_time_to_move[TP_index] = TP_time_closing_ex[TP_index]
                        • -------- ------------------------------------------------Close----------------------------------------- --------
                        • -------- This is need during the art of portal animtaions, to keep animation look and real unit move syncronized --------
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • TP_time_to_move[TP_index] Less than 0.60
                          • Then - Actions
                            • Set TP_speed = 10000.00
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • TP_time_to_move[TP_index] Greater than 2.00
                              • Then - Actions
                                • Set TP_speed = ((TP_height_max_ex[TP_index] - TP_height_min_ex[TP_index]) / TP_time_to_move[TP_index])
                              • Else - Actions
                                • Set TP_speed = ((TP_height_max_ex[TP_index] - TP_height_min_ex[TP_index]) / (TP_time_to_move[TP_index] - 0.20))
                        • Animation - Change TP_t_top[TP_index] flying height to TP_height_min_ex[TP_index] at TP_speed
                        • Animation - Change TP_t_top2[TP_index] flying height to TP_height_min_ex[TP_index] at TP_speed
                      • Else - Actions
                    • -------- ------------------------------------------------------------------------------------------------------------ --------
                  • Else - Actions
                • -------- ------------------------------------------------------------------------------------------------------------ --------
                • Custom script: call RemoveLocation ( udg_TP_point_temp )
                • Custom script: call RemoveLocation ( udg_TP_point_temp2 )
              • Else - Actions

1.1:
-added more portal customization for user (check the' Actions to apply (full list)' trigger)
-fix triggers, with help of Maker hints
1.2 Update:
added ability to transform unit to "Energy Bird" and Move it NOT instantly.
add portal model change


Keywords:
Portal, Teleport, Arcane, Water
Contents

Just another Warcraft III map (Map)

Reviews
16 Dec 2011 Bribe: I have adjusted the rating to 4/5 (Recommended). This is one of the most easy to read scripts I've had to review and I think this is good enough to deserve better than a 3/5.

Moderator

M

Moderator

16 Dec 2011
Bribe: I have adjusted the rating to 4/5 (Recommended). This is one of the most easy to read scripts I've had to review and I think this is good enough to deserve better than a 3/5.
 
Level 7
Joined
Aug 31, 2011
Messages
125
You can post triggers buy going to the trigger editor then go to your triggers then right click on it and it will say "Copy as Text" press it. Once you have that do this:
[trigger]Paste here[/trigger]

edit - i didnt download map yet but if thats the map in screenshot, i believe that is a imported model. Do not put those in map because all it does is just take more file size, if its for a spell model though (only for the spell) it may be okay...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Are you sure you want to make the portal give that much vision? You can also remove the upgrades used from the dummy.
You have some special effect stuff in both then and else branches in the looping trigger, take them out out the if/then/else.
The looping trigger should be initially off.
Pick units in range doesn't pick units with locust, so the unit type filter is not needed.
You shouldn't check index == 0 during every loop, only when the index is subtracted from.
You should make it more easily configurable.
 
Level 4
Joined
May 9, 2010
Messages
50
Are you sure you want to make the portal give that much vision? You can also remove the upgrades used from the dummy.
You have some special effect stuff in both then and else branches in the looping trigger, take them out out the if/then/else.
The looping trigger should be initially off.
Pick units in range doesn't pick units with locust, so the unit type filter is not needed.
You shouldn't check index == 0 during every loop, only when the index is subtracted from.
You should make it more easily configurable.

fixed, ty
 
Top