I've got a trigger/region-based teleport system in my map. The issue is that i'd like units to automatically use those teleports to decrease their travel time. Teleport system can be reworked, if needed. I'll attach an explanatory photo.
You could have a trigger that fires every time a unit is given a move order. Measure the distance between the unit's current location and the target point if the unit doesn't use the portals.
Then measure distance from the unit to whichever of the portals is closer, and the distance from the target point to whichever portal is closer.
IF the sum of these two distances is less than the walking distance, then replace the move order with an order to move to the portal, get ported, and move to destination.
Of course, having a trigger running every time a move order is given will likely give you a serious performance hit, but I can't think of another way to do it.
Doesn't work, unfortunately. The stalker not only doesnt enter portal entrance after clicking once (instead you gotta click again when it's touching it) but also after teleportation it's stuck and appears to be teleporting there every 0.1 second (judging by constant creation of blink actor) and obviously doesnt carry on to target position.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've got a trigger/region-based teleport system in my map. The issue is that i'd like units to automatically use those teleports to decrease their travel time. Teleport system can be reworked, if needed. I'll attach an explanatory photo.
If anyone would know a solution it would be all the people recreating way gates from WC3.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
You could have a trigger that fires every time a unit is given a move order. Measure the distance between the unit's current location and the target point if the unit doesn't use the portals.
Then measure distance from the unit to whichever of the portals is closer, and the distance from the target point to whichever portal is closer.
IF the sum of these two distances is less than the walking distance, then replace the move order with an order to move to the portal, get ported, and move to destination.
Of course, having a trigger running every time a move order is given will likely give you a serious performance hit, but I can't think of another way to do it.
I'll just leave it here:
https://www.sc2mapster.com/projects/waygate-system-library
Previously known as: SomeoneTookMyNameTT
Told you someone would have already made one.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Doesn't work, unfortunately. The stalker not only doesnt enter portal entrance after clicking once (instead you gotta click again when it's touching it) but also after teleportation it's stuck and appears to be teleporting there every 0.1 second (judging by constant creation of blink actor) and obviously doesnt carry on to target position.