• 🏆 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!

[Trigger] Region Teleport Crash

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
here i wanted to make a simple way to teleport in another region

i wanted to begin by making a code in gui first to get an idea than turn it into jass!!

so i tryed to make this, when i enter in this region wc3 bugg and uber lag and wc3 freeze.... so i tryed also with triggering unit,same problem, its not the first time its happening to me O_O do i have to put a circle of power on the ground ?

  • Move
    • Events
      • Unit - A unit enters Region 020 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set RegionPoint[1] = (Center of Region 024 <gen>)
      • Unit - Move (Entering unit) instantly to RegionPoint[1]
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_RegionPoint[1])
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Move
    • Events
      • Unit - A unit enters Region 020 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set RegionPoint[1] = (Center of Region 024 <gen>)
      • Unit - Move (Entering unit) instantly to RegionPoint[1]
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_RegionPoint[1])
  • Move
    • Events
      • Unit - A unit enters Region 024 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set RegionPoint[1] = (Center of Region 020 <gen>)
      • Unit - Move (Entering unit) instantly to RegionPoint[1]
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_RegionPoint[1])
This is an infinite loop, it keeps moving from 24 to 20 to 24 to 20 to 24, crash..

That is what DSG meant, check if you dont have any events that run when a unit enters region 24, if you do, make sure they dont create an infinite loop like this (or possible with more regions in between, like 24,20,16,18,24,20,16,18,crash)
 
Level 13
Joined
Jun 22, 2004
Messages
783
  • Move
    • Events
      • Unit - A unit enters Region 020 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set RegionPoint[1] = (Center of Region 024 <gen>)
      • Unit - Move (Entering unit) instantly to RegionPoint[1]
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_RegionPoint[1])
  • Move
    • Events
      • Unit - A unit enters Region 024 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set RegionPoint[1] = (Center of Region 020 <gen>)
      • Unit - Move (Entering unit) instantly to RegionPoint[1]
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_RegionPoint[1])
This is an infinite loop, it keeps moving from 24 to 20 to 24 to 20 to 24, crash..

That is what DSG meant, check if you dont have any events that run when a unit enters region 24, if you do, make sure they dont create an infinite loop like this (or possible with more regions in between, like 24,20,16,18,24,20,16,18,crash)

Topology wise it would be a loop cause once entered region 20 it keeps on returning to region 20, however this is not a loop that would cause an error due to infinite trigger recals, even if those 2 regions are next to one another the unit would be sorta patrolling.

You do however do something once entered region 20 that gives your computer so much to process through (meaning you try to do so much things at the same time) that it starts to freeze up to the point you memory gives in her limits and warcraft thus gives you this error and is forced to close itself.

This is not the caused by the trigger you showed us.

i wanted to begin by making a code in gui first to get an idea than turn it into jass!!
Not a good idea for most of the Jass code that is used in GUI is very un-efficient, so basically renders it useless weather you write it in jass or use it in GUI, either choose to do everything in GUI or write everything in jass, would be my suggestion.
 
Level 10
Joined
Feb 20, 2008
Messages
448
i agree with you but i started to learn jass so thats how tutorial showed me to practice >.>
but well yes i do have 2 trigger that run infinite Loop!
i will make 2 other region in front of the teleport!!

edit : and now its fix

thx for help + rep for who did help
 
Last edited:
Status
Not open for further replies.
Top