1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    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.

Portal System 1.0

Submitted by GhostHunter123
This bundle is marked as approved. It works and satisfies the submission rules.
This is simply a teleportation system, in which a unit enters a region and is then transported to an another point via coordinates.

The Code
Configuration
  • Teleport Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: local region r
      • Hashtable - Create a hashtable
      • Set TELE_HT = (Last created hashtable)
      • -------- ++++++ --------
      • -------- This is the region for entering to be transported --------
      • Set TeleportSys_EnterRect[1] = TeleRe1 <gen>
      • -------- X coordinate for the point which units are transported to --------
      • Set x[1] = -961.40
      • -------- Y coordinate for the point which units are transported to --------
      • Set y[1] = 1997.50
      • -------- ++++++ --------
      • Set TeleportSys_EnterRect[2] = TeleRe2 <gen>
      • Set x[2] = -960.80
      • Set y[2] = 1484.90
      • -------- ++++++ --------
      • Set TeleportSys_EnterRect[3] = TeleRe3 <gen>
      • Set x[3] = -965.00
      • Set y[3] = 906.70
      • -------- ++++++ --------
      • Set TELE_TRG = Teleport Go <gen>
      • -------- Looping to register the defined regions --------
      • For each (Integer TeleportSys_Int) from 1 to 10000, do (Actions)
        • Loop - Actions
          • Custom script: exitwhen udg_x[udg_TeleportSys_Int] == null
          • Custom script: set r = CreateRegion()
          • Custom script: call RegionAddRect(r, udg_TeleportSys_EnterRect[udg_TeleportSys_Int])
          • Custom script: call TriggerRegisterEnterRegion(udg_TELE_TRG, r, null)
          • Custom script: set udg_ID = GetHandleId(r)
          • Hashtable - Save TeleportSys_Int as 0 of ID in TELE_HT
          • Set TELE_LOCS[TeleportSys_Int] = (Point(x[TeleportSys_Int], y[TeleportSys_Int]))
      • Custom script: set r = null



Functions
  • Teleport Go
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_ID = LoadInteger(udg_TELE_HT, GetHandleId(GetTriggeringRegion()), 0)
      • Set TeleportSys_Unit = (Triggering unit)
      • -------- Sets the position of the unit via coordinates --------
      • Custom script: call SetUnitX(udg_TeleportSys_Unit, udg_x[udg_ID])
      • Custom script: call SetUnitY(udg_TeleportSys_Unit, udg_y[udg_ID])
      • -------- Pan the camera for Owner of Triggering Unit --------
      • -------- To the Position of Triggering Unit --------
      • Camera - Pan camera for (Owner of TeleportSys_Unit) to TELE_LOCS[ID] over 0.00 seconds
      • -------- Since the function SetUnitX or SetUnitY does not interrupt order --------
      • -------- Call Triggering unit to stop --------
      • Unit - Order TeleportSys_Unit to Stop
      • Custom script: set udg_TeleportSys_Unit = null


Thanks to rulerofiron99
Updated - Thanks to Maker


Keywords:
System, Teleport, Region, Coordinates
Contents

Teleport System (Map)

Reviews
Moderator
21:12, 18th Feb 2013 Magtheridon96: This could be useful.
  1. 21:12, 18th Feb 2013
    Magtheridon96: This could be useful.
     
  2. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Prefixes is a must.

    Portal System not Teleportation because you are using regions or locations
     
  3. Chaosy

    Chaosy

    Tutorial Reviewer

    Joined:
    Jun 9, 2011
    Messages:
    11,041
    Resources:
    18
    Icons:
    1
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    18
    the system wont remove events which is bad. Also id use regions insted

    also what if i only want to move ONE unit?
     
  4. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    That is a good one Chaosy
     
  5. gorillabull

    gorillabull

    Joined:
    Jul 17, 2011
    Messages:
    1,368
    Resources:
    2
    Spells:
    2
    Resources:
    2
    waygates can be set up with 2 lines
     
  6. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,293
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Hm, whats the problem of not removing events? It doesn't do anything bad staying many events there.
     
  7. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Personally I would do it like this:
    Triggers

    • Teleport Configuration
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Custom script: local region r
        • Hashtable - Create a hashtable
        • Set TELE_HT = (Last created hashtable)
        • -------- ++++++ --------
        • -------- This is the region for entering to be transported --------
        • Set TeleportSys_EnterRect[1] = TeleRe1 <gen>
        • -------- X coordinate for the point which units are transported to --------
        • Set x[1] = -961.40
        • -------- Y coordinate for the point which units are transported to --------
        • Set y[1] = 1997.50
        • -------- ++++++ --------
        • Set TeleportSys_EnterRect[2] = TeleRe2 <gen>
        • Set x[2] = -960.80
        • Set y[2] = 1484.90
        • -------- ++++++ --------
        • Set TeleportSys_EnterRect[3] = TeleRe3 <gen>
        • Set x[3] = -965.00
        • Set y[3] = 906.70
        • -------- ++++++ --------
        • Set TELE_TRG = Teleport Go <gen>
        • -------- Looping to register the defined regions --------
        • For each (Integer TeleportSys_Int) from 1 to 10000, do (Actions)
          • Loop - Actions
            • Custom script: exitwhen udg_x[udg_TeleportSys_Int] == null
            • Custom script: set r = CreateRegion()
            • Custom script: call RegionAddRect(r, udg_TeleportSys_EnterRect[udg_TeleportSys_Int])
            • Custom script: call TriggerRegisterEnterRegion(udg_TELE_TRG, r, null)
            • Custom script: set udg_ID = GetHandleId(r)
            • Hashtable - Save TeleportSys_Int as 0 of ID in TELE_HT
            • Set TELE_LOCS[TeleportSys_Int] = (Point(x[TeleportSys_Int], y[TeleportSys_Int]))
        • Custom script: set r = null


    • Teleport Go
      • Events
      • Conditions
      • Actions
        • Custom script: set udg_ID = LoadInteger(udg_TELE_HT, GetHandleId(GetTriggeringRegion()), 0)
        • Set TeleportSys_Unit = (Triggering unit)
        • -------- Sets the position of the unit via coordinates --------
        • Custom script: call SetUnitX(udg_TeleportSys_Unit, udg_x[udg_ID])
        • Custom script: call SetUnitY(udg_TeleportSys_Unit, udg_y[udg_ID])
        • -------- Pan the camera for Owner of Triggering Unit --------
        • -------- To the Position of Triggering Unit --------
        • Camera - Pan camera for (Owner of TeleportSys_Unit) to TELE_LOCS[ID] over 0.00 seconds
        • -------- Since the function SetUnitX or SetUnitY does not interrupt order --------
        • -------- Call Triggering unit to stop --------
        • Unit - Order TeleportSys_Unit to Stop
        • Custom script: set udg_TeleportSys_Unit = null

     

    Attached Files:

  8. Wolf_Wing

    Wolf_Wing

    Joined:
    Nov 24, 2012
    Messages:
    160
    Resources:
    0
    Resources:
    0
    hmmmm but the waygate can be use for teleport
     
  9. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    @Maker
    Then,you should submit yours because you have coded that :D