Page 1 of 2
preventing fall damage
Posted: Mon Nov 17, 2014 2:58 pm
by remilafo
So in my custom dungeon, i have the party falling really long way. like 50 levels
anyone got ideals of how to prevent fall damage or allow the party to absorbs a large hit in the range of 600+ dmg..
Teleporters conserve momentum and pits conserve momentum...
so?
Prem
Re: preventing fall damage
Posted: Mon Nov 17, 2014 3:10 pm
by Dunkler
Let them fall into water
Re: preventing fall damage
Posted: Mon Nov 17, 2014 5:31 pm
by remilafo
Dunkler wrote:Let them fall into water
first thing i tried. Even with water that is 13 cells deep they still splatter to their deaths.
Re: preventing fall damage
Posted: Mon Nov 17, 2014 6:35 pm
by GoldenShadowGS
It worked for me. I have a fall from +1 to -7 elevation pit. the floor below has -1 elevation deep water. No damage at all when I splash into it.
Re: preventing fall damage
Posted: Mon Nov 17, 2014 6:53 pm
by QuintinStone
Does the 'party' game object have a gravity component?
Re: preventing fall damage
Posted: Mon Nov 17, 2014 7:56 pm
by NutJob
Maybe there a way to setImmunities() briefly before the impact on each champion in the party?
isFalling() the trigger, and then a floor_trigger to remove whatever was set after the fall (impact)?
Is this a question? Oh oh, I can answer that! Yes.
Re: preventing fall damage
Posted: Tue Nov 18, 2014 2:51 am
by remilafo
GoldenShadowGS wrote:It worked for me. I have a fall from +1 to -7 elevation pit. the floor below has -1 elevation deep water. No damage at all when I splash into it.
I will try it again, perhaps water does buffer a bit of damage but +1 to -7 is only 8 cells. In my case i have the party transiting 7 to -7 9 times for a total of 126 cells. The acceleration is quick impressive, near the end of the transistion the party is clocking around 50 cells/s ...
Prem
Re: preventing fall damage
Posted: Tue Nov 18, 2014 8:48 am
by mahric
The way I did it in LoG1 in the Wine Merchant's Basement was like this:
Before fall:
- Just before falling, increase the max health of all party members by 250 (250 was enough for my fall, you might need to add more)
- Heal the part by 250 health
- Open the trapdoor and start the falling!
Landing:
- Make sure they land on a pressure plate that triggers a script
- In the script reduce the max health and health that you added before (250 health in my case)
- Set the health of all party members to 1 (but not the max health), to make it seem like they're really lucky having survived and have to heal up first
The source of the Wine Merchant's Basement is available in the thread in my signature.
You might be able to do something like this with the functions getHealth() and getMaxHealth() and setHealth() and such on the champion component.
I can't try right now (i'm at work) but you might give it a try.
Re: preventing fall damage
Posted: Tue Nov 18, 2014 10:33 am
by nichg
This gave me an awesome idea. If we figure out how to mess with the party's gravity-based movement, can we create something where the party is actually flung upwards (e.g. maybe they have to bounce up into a teleporter at a higher elevation)?
Is it possible to have horizontal momentum too? Can you tweak the party's Gravity component to make them try to 'jump' a gap, possibly falling one or more levels down as they go?
Re: preventing fall damage
Posted: Tue Nov 18, 2014 12:04 pm
by minmay
There's no horizontal gravity.
nichg wrote:This gave me an awesome idea. If we figure out how to mess with the party's gravity-based movement, can we create something where the party is actually flung upwards (e.g. maybe they have to bounce up into a teleporter at a higher elevation)?
Sure: just use setWorldPosition to place the party somewhere off the ground, then use "party.gravity:setFallingSpeed(velocity)" where velocity is the downward velocity you want the party to have. You can also use "party.gravity:disable()" to make them stop in midair and hover there, but it will be reactivated as soon as the party moves or turns with the keyboard (turning with mouselook, however, doesn't re-enable gravity). Note that the party can freely turn and move while "falling" upwards, but not downwards.
I was able to jump over the Forgotten River by typing this in the debug console:
Code: Select all
party:setWorldPosition(55.5,0.1,70.5,0) party.gravity:setFallingSpeed(-50)
though I took a lot of damage when I hit the ground.
However, there is something you should be concerned about: the party doesn't really change elevations while falling upwards - you can't use it to "jump" onto a higher platform or over an obstacle (but jumping over water/pits/teleports/etc works fine), and utter chaos will occur if the party moves into a ladder while falling upwards.