• 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.

Underground!!

Status
Not open for further replies.
Level 7
Joined
Dec 17, 2017
Messages
134
Is there a way to make units move under the ground? They should not be seen. For example, the unit goes into a cave and continues in. How will he go through the terrain!?
Another thing, is there any way by which the terrain will get transparent when he enters the cave? The high ground will become invisible and the inside of the cave can be seen once he enters it?
Thanks!
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
Is there a way to make units move under the ground? They should not be seen. For example, the unit goes into a cave and continues in. How will he go through the terrain!?
Another thing, is there any way by which the terrain will get transparent when he enters the cave? The high ground will become invisible and the inside of the cave can be seen once he enters it?
Thanks!
Warcraft III is a 2D game. It does not support multiple terrain levels.

The most common way to implement caves is to create the cave area near a corner or edge of the map and teleport the units, eg via waygate, between the cave area and the main map area. Triggers, boarders as well as environmental hazards can be used to help prevent units leaking from the main map area to the cave area. This approach is even used in StarCraft II and is how Heroes of the Storm implemented the Haunted Mines map.
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
@Dr Super Good Actually, there was a map where you could go through a cave and the unit could not be seen as it was moving through the low ground. The campaign Nature's Call - The Return of The Dragon had this.
I recall it being done through some trickery. It replaced the unit using a morph with a moveable burrowed unit. The cave area and cliffs had a path of burrow moveable pathing this unit could use. When it got to a mouth of the cave it was morphed back into its original form.

It only worked so well because nothing could really interact with it during this entire process (2D single layer map design).

Performing something like Heroes of the Storm gives the illusion of in the Haunted Mines map can only be done with separate above and underground areas on the 2D map with portals to connect them.

This is also why bridges cannot be made to be walked under, as the game only supports a single 2D map layer. One can use a similar illusion to the cave in the above mentioned campaign, but again that requires that map design prevents there from being units on top of the bridge which can interact with those under the bridge or that under the bridge has no ability to interact with other units at all.
 
Level 13
Joined
Oct 12, 2016
Messages
769
Actually, I am very curious about this too.
I found this map: PUBG v1.9
which had doodad structures with a roof. Nothing unusual, except for how the roofs become transparent (similar to what @Abishkar is requesting)

Problem is, I can't view the triggers or code on that map, so I have no idea how it's done.
I would love to know for my own map... it definitely has something to do with doodads, units or destructables.

I imagine a similar concept can be used for you, Ned, to walk over and under bridges with an elevator.
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
But then, how are elevators made? We can walk under them right? @Dr Super Good
In real life we exist in a 3D world rather than in a 2D world like Warcraft III. Sure Warcraft III might look 3D but mechanically it is 2D, one could replace all 3D with 2D sprites in the style of StarCraft or Warcraft II and it would still sync up with 3D clients perfectly. This applies to most RTS games except a select few which pride themselves in their realistic, but mostly buggy, 3D combat physics.

One such RTS game is Supreme Commander. There your Fat Boy mobile fortress would love to shoot repeatedly into the side of a hill trying to hit units behind the hill due to such physics! Cool, but buggy and annoying...

If you mean in Warcraft III then you cannot walk under elevators. Either the elevator is a fake consisting of a floating model as if it were a hologram, or it is a walkable destructable which all units will use their height sampler (performed perpendicular to the map axis) to immediately offset their graphic Z displacement height based on the geometry the sampler intersected with.
I found this map: PUBG v1.9
which had doodad structures with a roof. Nothing unusual, except for how the roofs become transparent (similar to what @Abishkar is requesting)
Trigger Happy's prototype RPG uses the same mechanics. It is quite common.

From what I understand it is done either by polling unit positions (inefficient) or by unit enters/exists region events. When a unit is in the structure the trigger then adjust the alpha component of the roofs vertex colour to be transparent. Such roofs could be made of units, destructables and more recently special effects, basically anything that one can control vertex colour alpha with triggers.
 
Level 7
Joined
Dec 17, 2017
Messages
134
In real life we exist in a 3D world rather than in a 2D world like Warcraft III. Sure Warcraft III might look 3D but mechanically it is 2D, one could replace all 3D with 2D sprites in the style of StarCraft or Warcraft II and it would still sync up with 3D clients perfectly. This applies to most RTS games except a select few which pride themselves in their realistic, but mostly buggy, 3D combat physics.

One such RTS game is Supreme Commander. There your Fat Boy mobile fortress would love to shoot repeatedly into the side of a hill trying to hit units behind the hill due to such physics! Cool, but buggy and annoying...
Lol, no, I did not mean in real life. In Warcraft 3, can't you walk under elevators? I thought you can
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
In Warcraft 3, can't you walk under elevators?
Which I already answered...
If you mean in Warcraft III then you cannot walk under elevators. Either the elevator is a fake consisting of a floating model as if it were a hologram, or it is a walkable destructable which all units will use their height sampler (performed perpendicular to the map axis) to immediately offset their graphic Z displacement height based on the geometry the sampler intersected with.
In other words either all units will walk under the elevator because the elevator is nothing more than a floating model like a special effect, or all units will walk on top of the elevator because their height sampler intersects with it.
 
Level 7
Joined
Dec 19, 2014
Messages
300
I could easily create a terrain as you demanded it in your question. The only problem would be that the terrain over the cave could not be entered by units anymore (because the area is already walkable in the cave). Over the cave i would put some nice fitting doodads that look like actual terrain (when done right) and i would delete their collision. I would create some extra landscape doodads in the object editor for that matter. When player plays in the surface of the map (over the ground) the player will with his standard game camera just see some random landscape and will not think or see that there is underground are under the landscape. He will just notice that it's not walkable, possibly because some trees and stones are on the area. The borders of the cafe area are of course blocked with collision blockers. Later the player comes to the cave entrance, and when his units enter the entrance the camere will suddenly zoom in a certain length. The camera will zoom in so far that the player just looks under the constructed terrain and he will think that he is in a real cave. And in case that the player zooms out accidently again, you will just give him a command to zoom in again to see the inner of the cave. And when the player leaves the cave he can just zoom out again if he wants (by pressing delete for example) or it could also zoom out automatically.
 
Status
Not open for further replies.
Top