• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to make one way terrain?

Status
Not open for further replies.
Level 5
Joined
May 5, 2007
Messages
120
Hi, I'm trying to make terrain that you can travel across in one direction only. For example, at a cliff edge, a player could move "down" the cliff, but not be able to climb back up. I could make a region that teleports the player, but the problem I'm having with this is that the player can't "click past" the cliff edge, without the unit turning around to try and take a different route. Any ideas?
 
Level 4
Joined
Apr 27, 2007
Messages
65
have you tried to make a region that makes the unit go down, but not a region that goes both way...

Let me explain: You make a region in front of the cliff, and then you make at trigger that says:

Unit enters Region

Unit equal to this or that

Move unit Instantly to Region2

and voila, you have made a 1way teleport trigger...


Warning: I only said this out of my mind, so you are maybe going to get some truobles...

I forgot to say, that you make 1 Region on the top of the cliff, and 1 on the bottum...
 
Last edited by a moderator:
Level 13
Joined
Aug 31, 2005
Messages
823
Your best solution would be to make a dummy unit based off the waygate. Then change the model file to something very inconspicuous. Units will then use the waygate if the player clicks below the cliff because pathing takes into consideration the location of waygates. The other way could be to place a region around the edges and if a unit gets too close have it moved to the bottom of the cliff (which can be done in a number of ways)
 
Level 5
Joined
May 5, 2007
Messages
120
Well, I've tried several things now. First, I made some lava cracks into a way gate. This works well, except "the issue" that I'm having with each method I've tried. The issue is that you go "bam" and you're there.

Second, I tried giving people the "jump" ability whenever they were in the area. This works better, imo, because you "choose" to go down. The "jump" ability is just an instant cast spell, and a trigger that detects it and moves them to a region.

Anybody have any idea how the "jump" ability works in Dota? Specifically, it'd be nice to actually see the unit jump down...

Thanks for the help everyone, the waygate information is a way better method of doing my doors then previously.
 
Level 13
Joined
Aug 31, 2005
Messages
823
I started to describe this before but I wasnt sure if it would get confusing or not. If you want to see the unit while it moves you just need to set up 2 triggers, some variables (temppoint), and your ability (jump).
Say you want to use the autocast ability, your trigger should look like this.
  • Event: Unit Finishes casting an ability
  • Conditions: Ability being cast equal to jump
  • Actions: Set temppoint to (unit (position of triggering unit)) offset by (100) towards (unit(facing angle of (triggering unit)
  • Unit - Turn collision for (Triggering unit) Off
  • Unit - Set the custom value of (Triggering unit) to 1337
  • Event: Time - Every 0.50 seconds of game time
  • Conditions:
  • Actions:
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Point-value of (Matching unit)) Equal to 1337)) and do (Actions)
    • Loop - Actions
  • Unit - Make (Picked unit) face (temppoint)
  • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 100.00 towards (Facing of (Picked unit)) degrees)
  • If ((Distance between (Position of (Picked unit)) and (temppoint))) Less than or equal to 1.00) then do (Unit - Set the custom value of (Picked unit) to 100) else do (Do nothing)
  • If ((Distance between (Position of (Picked unit)) and (temppoint))) Less than or equal to 1.00) then do (Unit - Turn collision for (Triggering unit) On) else do (Do nothing)
Edit: You would probably want to use the If then Else Multiple Functions action rather than the single If, Then that I used.
 
Level 5
Joined
May 5, 2007
Messages
120
Ok, I got it working the way I like it. It calculates the landing spot so you can only jump to certain spots (the bottoms of cliffs.) Can I make the unit "flying" temporarily instead of going no collision? Or set the Z value? Thanks :)
 
Status
Not open for further replies.
Top