In the developer commentary for Portal2, the opening has some interesting coding trickery, to save on processor time, or something. Basically, when you're being shifted about, your actual character is in another room, and moves around that, then your camera is placed in a relative point in the actual moving room.
This made me think about bridges, and attacking around them. Having a marine on top, and a zealot down below, the zealot shouldn't be able to attack the marine, but can (as far as some thread I read implies). What if, upon a unit entering the top of the bridge, their actual unit was moved to a room elsewhere on the map, and a fake unit projected onto the bridge top?
I haven't put too much thought into it, but this would prevent units under the bridge attacking the ones on top of the bridge. Unfortunately, it also prevents vice versa, which is a shame, 'cause sieged tanks on a bridge sounds like the coolest thing I've ever heard. (Also, pathfinding issues, etc.)
Anyone got any thoughts? It sounds like something interesting to use as chewing gum for the mind, I think.
I think if you use the terrain object bridges it preserves the terrain height, whereas doodads or units do not. If the same height flag for the unit below's weapon is checked, it shouldn't be able to hit the unit on the bridge, supposing the terrain height is preserved.
I suppose you could mirror the unit on the bridge but it seems like a waste of time to me - at least for a mechanic like that.
I have actually thought this up before but I have never actually implemented it. Say you take a bridge and take off its ability to automatically set a unit to the height its currently at. then put a location below the bridge (the location name is Height) and two locations A(left to the bridge) and B(right of the bridge) on the Sides. If player unit goes over A or B a Boolean is turned True and when they enter the location Height their height will be changed to 2 or 3 or whatever. Now once they have crossed over the bridge there are two other locations, to the Left of A is C and to the right of B is D. Once a player enters C or D the Boolean will be changed to false. Once again with some trigger magic you can make it so that if the Boolean is false the unit's height will not be changed. Now for the Zealot attacking the marine on top of the bridge here is what i propose. Make it so that Both the Marine and the Zealot can only attack ground(i know your now thinking...wha?...but hang in there). Now once the two units enter "Height" change their properties to an air unit so that not only will the zealot be attacking something above the bridge, the marine will not be able to shoot through the floor at the zealot. Now if you did this the location would have to be positioned perfectly so that the unit doesn't suddenly pop in the air or drop to the ground then get corrected, and i'm not sure if you can change a unit like that in the trigger editor. if it is not possible to directly change a unit from a ground unit to an air unit then possibly an ability on the units from the data editor could be activated once it enters "Height". Now I am also unsure that once you make the unit an air unit that its footprint will go away, if it doesn't, Just get rid of the footprint of the unit so that the two units don't still collide because i could see a person making an impenetrable wall of units, plus it would make it look polished. Well that wraps up my theoretical proposal to a working bridge.
Pathfinding still poses an issue, as the units won't know that they can change to air (for instance, try landing a viking, then telling it to go over a cliff. It'll walk around.)
Also, units under the bridge would not be able to fire at passing air units, making unit control a bitch.
Also, units on top of the bridge would be able to eb shot by air-only units, such as the Phoenix.
hmm i see what you mean, i'g going to take a stroll through the data editor and see if I can make a custom unit type other than the Air and Ground, if not( good chance not) I will try to think of something that will change the units so that they cannot attack each other lol.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In the developer commentary for Portal2, the opening has some interesting coding trickery, to save on processor time, or something. Basically, when you're being shifted about, your actual character is in another room, and moves around that, then your camera is placed in a relative point in the actual moving room.
This made me think about bridges, and attacking around them. Having a marine on top, and a zealot down below, the zealot shouldn't be able to attack the marine, but can (as far as some thread I read implies). What if, upon a unit entering the top of the bridge, their actual unit was moved to a room elsewhere on the map, and a fake unit projected onto the bridge top?
I haven't put too much thought into it, but this would prevent units under the bridge attacking the ones on top of the bridge. Unfortunately, it also prevents vice versa, which is a shame, 'cause sieged tanks on a bridge sounds like the coolest thing I've ever heard. (Also, pathfinding issues, etc.)
Anyone got any thoughts? It sounds like something interesting to use as chewing gum for the mind, I think.
I think if you use the terrain object bridges it preserves the terrain height, whereas doodads or units do not. If the same height flag for the unit below's weapon is checked, it shouldn't be able to hit the unit on the bridge, supposing the terrain height is preserved.
I suppose you could mirror the unit on the bridge but it seems like a waste of time to me - at least for a mechanic like that.
@BasharTeg: Go
Wait, so there's actually a working bridge in the editor!?
Worked for me at least O.o
@BasharTeg: Go
No, you can't run underneath it.
I have actually thought this up before but I have never actually implemented it. Say you take a bridge and take off its ability to automatically set a unit to the height its currently at. then put a location below the bridge (the location name is Height) and two locations A(left to the bridge) and B(right of the bridge) on the Sides. If player unit goes over A or B a Boolean is turned True and when they enter the location Height their height will be changed to 2 or 3 or whatever. Now once they have crossed over the bridge there are two other locations, to the Left of A is C and to the right of B is D. Once a player enters C or D the Boolean will be changed to false. Once again with some trigger magic you can make it so that if the Boolean is false the unit's height will not be changed. Now for the Zealot attacking the marine on top of the bridge here is what i propose. Make it so that Both the Marine and the Zealot can only attack ground(i know your now thinking...wha?...but hang in there). Now once the two units enter "Height" change their properties to an air unit so that not only will the zealot be attacking something above the bridge, the marine will not be able to shoot through the floor at the zealot. Now if you did this the location would have to be positioned perfectly so that the unit doesn't suddenly pop in the air or drop to the ground then get corrected, and i'm not sure if you can change a unit like that in the trigger editor. if it is not possible to directly change a unit from a ground unit to an air unit then possibly an ability on the units from the data editor could be activated once it enters "Height". Now I am also unsure that once you make the unit an air unit that its footprint will go away, if it doesn't, Just get rid of the footprint of the unit so that the two units don't still collide because i could see a person making an impenetrable wall of units, plus it would make it look polished. Well that wraps up my theoretical proposal to a working bridge.
@joecab: Go
Pathfinding still poses an issue, as the units won't know that they can change to air (for instance, try landing a viking, then telling it to go over a cliff. It'll walk around.)
Also, units under the bridge would not be able to fire at passing air units, making unit control a bitch.
Also, units on top of the bridge would be able to eb shot by air-only units, such as the Phoenix.
hmm i see what you mean, i'g going to take a stroll through the data editor and see if I can make a custom unit type other than the Air and Ground, if not( good chance not) I will try to think of something that will change the units so that they cannot attack each other lol.