I took some time developing a system that would enable on the fly/live cliffs.
I decided to move to another project, but as the results of this one were not so awful, I'm publishing it here so it does no go to waste.
Feel free to rip it apart and use it as you want, and if you do manage to find a better way to do on the live cliff, go ahead and post it :)
I've tried various way for this to work, and this one had the less computation time (Description of the system at the end).
How does it work in game, three abilities:
Raise the cliff, will always create a High Cliff, regardless of what is already there)
Lower the cliff, will always create a Low Cliff (read - hole in the ground)
Add a ramp, will scan for its surrounding, and place an access ramp if there's a high or a low cliff
All of the above use actors terrain deformation to create a cliff-like effect.
Units on the ground can not go on the high/low cliffs unless they walk on a ramp first (or find a glitch :) ).
Units on higher grounds will take half damage from units on low grounds (just here as an example behavior, can be modified).
Limitations:
Non-sight effect is not implemented (i.e you can see through a high cliff)
Not bug-free (hey, I'm no expert !)
Ugliness :D
How does it work in triggers (extensive regions management :p):
Each cliff level is linked to a Region plane. Each units has a cliff level stored in a custom value. When a unit leaves a region plane, its location is saved. On entering the next region plane, it's ported back to the saved location if cliff levels of both units and region are not compatible. If it's a ramp, the units can enter the region, and its cliff level is modified to the ramp one. It can then process to walk on the cliff.
Known bugs:
Changing the ground back and forth to high cliffs/low cliffs/ ramp can create some glitches (small gaps), and trap units.
Creating a cliff under some units will not change their cliff levels.
Actor deformation areas do not match the trigger areas perfectly
I am not going to work on the map for at least a week or so, even If I had a great concept based on this particular mechanism. However, if you ever do find some more bugs and limitations, I'll gladly list them in this post !
Hi everyone,
I took some time developing a system that would enable on the fly/live cliffs. I decided to move to another project, but as the results of this one were not so awful, I'm publishing it here so it does no go to waste.
Feel free to rip it apart and use it as you want, and if you do manage to find a better way to do on the live cliff, go ahead and post it :)
I've tried various way for this to work, and this one had the less computation time (Description of the system at the end).
How does it work in game, three abilities:
All of the above use actors terrain deformation to create a cliff-like effect.
Units on the ground can not go on the high/low cliffs unless they walk on a ramp first (or find a glitch :) ). Units on higher grounds will take half damage from units on low grounds (just here as an example behavior, can be modified).
Limitations:
How does it work in triggers (extensive regions management :p):
Each cliff level is linked to a Region plane. Each units has a cliff level stored in a custom value. When a unit leaves a region plane, its location is saved. On entering the next region plane, it's ported back to the saved location if cliff levels of both units and region are not compatible. If it's a ramp, the units can enter the region, and its cliff level is modified to the ramp one. It can then process to walk on the cliff.
Known bugs:
I am not going to work on the map for at least a week or so, even If I had a great concept based on this particular mechanism. However, if you ever do find some more bugs and limitations, I'll gladly list them in this post !
Here's the link to the map.