Unpassable Terrain

lionheadxO

New Member
Reaction score
3
Hello everybody,

I was wondering if anyone has any idea how I could make unpassable terrain. What I mean by this is somehow making a cliff that you are not able to move through from periodic movement triggers such as Leap Abilities. I'm trying to make a hero selection tavern zone, but I need units to not be able to get in the area, but I need units to get out of the area. Is there away to make a place unpassable and targetable from spells such as Blink.
 

Shura

New Member
Reaction score
45
You could place pathing blockers on the terrain. Or you could place boundaries in the terrain palette.
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
One simple way to do it would be not having pathable terrain near the selection area so that no special abilities have that area within range. Another method would be something like this:

Event: Unit casts a spell
Condition: Spell is equal to <movement spell> and Target Position of (Ability being used) is equal to (Hero Tavern Area)
Action: Order (Triggering Unit) to Stop

For the Target Position part, (from how I've used it, there may be a better way) you'd have to find the X and Y coordinates of the tavern area, and essentially say Target Position is X > (some number) and Y > (some number), then order to stop. If any of that makes sense :eek: To find the coordinates of somewhere, I believe they are handily shown in the bottom-left corner of the screen, and they're the coordinates of wherever your cursor is on the map.

And a third way, which is simple and punishing for going out of where the player should be :p :
Create a region over the tavern area, then create a trigger that just does this:

Event: Unit enters (Tavern Area)
Action: Kill triggering unit

Then set it to default off so you can put your initial units in there, and make a second trigger that'll turn the first one on after, say, 5 seconds of game-time have elapsed. If you want to have a repick function, just add in that it disables the killer trigger for a second or two, create the repicker, and re-enable the killer trigger.

Sorry about the wall of text, but you should have an answer in there somewhere! :)
 

Darkness47

New Member
Reaction score
3
The leap skill may teleport the unit over a pathing blocker.


You can also try to make 4 rects for your TavernRegion borders and when a unit gets into it, then move it instantly in a range of 200 out of the rect (or what range you want)
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
What the OP is having problems with, from my understanding, is that some of the heroes have abilities like Blink. And if you are on one side of a region, and Blink to the opposite side, it doesn't perform triggers as if you entered the region. I think that's the problem the OP is having. Therefore, one solution (which I said in my previous post) is to just place terrain so that the heroes can never get into range to Blink into the tavern area. If you want to do it via regions and teleporting units that come near, you just need to make sure that the thinnest part of any region is wider than the maximum range of the heroes' Blink-like abilities.
 

lionheadxO

New Member
Reaction score
3
For the way to block the blink spells I think there is a way to trigger units from not being able to cast spells at certain regions. I know in DotA, there is a trigger that stops a unit from using a global teleport into the other teams base. When you target the enemies base, it sends you a message saying that you cant teleport there. Anyone know how to do this?
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
I would guess the short answer would be: Unit starts casting an ability, ability equal to global teleport, stop unit show game message? ^^
 

tmow

New Member
Reaction score
7
WRong guys...a pathing blocker wont work...NOR WILL A BOunDARY u can still blink over it...u need to make that a region

Event: unit enters region

Condition: Region being equal to Get the EF out

ACtions: Set current position of hero to equal X

Move unit instantly to X + -500, 0


That or just move em to another seprate made region
 

lionheadxO

New Member
Reaction score
3
Where do you find "Target Position of (Ability being used) is equal to (Hero Tavern Area)" from Xan Kriegors post
 

HydraRancher

Truth begins in lies
Reaction score
197
WRong guys...a pathing blocker wont work...NOR WILL A BOunDARY u can still blink over it...u need to make that a region

Event: unit enters region

Condition: Region being equal to Get the EF out

ACtions: Set current position of hero to equal X

Move unit instantly to X + -500, 0


That or just move em to another seprate made region

What the OP is having problems with, from my understanding, is that some of the heroes have abilities like Blink. And if you are on one side of a region, and Blink to the opposite side, it doesn't perform triggers as if you entered the region. I think that's the problem the OP is having. Therefore, one solution (which I said in my previous post) is to just place terrain so that the heroes can never get into range to Blink into the tavern area. If you want to do it via regions and teleporting units that come near, you just need to make sure that the thinnest part of any region is wider than the maximum range of the heroes' Blink-like abilities.

Please review the entire thread.
 

IronTrout

New Member
Reaction score
20
What you could do. Is create 3 or more dummy units that are placed at intervals between the casting place and position of order, if the dummy unit is created within a region, then the caster is ordered to stop. I've given it a shot, but the issue of the unit casting and the position of ability being cast is the same. Here's the code, so if you can find out how to find the position of blink being cast you can change it.

If worst comes to worst, then you might have to run the trigger after the teleporting has already occoured.

Trigger:
  • Deblink
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set Blink_Caster_Pos = (Target point of ability being cast)
      • Set Blink_Caster_Pos = (Position of (Casting unit))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Blink_DummyPos = ((Position of (Casting unit)) offset by ((Distance between Blink_CasterPoint and Blink_Caster_Pos) / (5.00 - (Real((Integer A))))) towards (Angle from Blink_CasterPoint to Blink_Caster_Pos) degrees)
          • Unit - Create 1 Path Checker for Player 1 (Red) at Blink_DummyPos facing Default building facing degrees
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Region Area1 &lt;gen&gt; contains (Last created unit)) Equal to True
                  • (Region Area2 &lt;gen&gt; contains (Last created unit)) Equal to True
            • Then - Actions
              • Unit - Order (Casting unit) to Stop
            • Else - Actions
              • Do nothing
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top