Question about the use of variable [max_falldown_amount]

Hello everyone. It’s me again. Recently, I’ve been planning to add a mechanic to the game where the character falls at a slow, constant speed after jumping.

You know, that standard move commonly seen in Castlevania games.

At first, I thought this would be a very simple feature to implement.

I figured I could easily achieve it by modifying the gravity influence after the jump.

However, I underestimated the complexity. The object’s MoveAndJumpSettings node has a variable called [Maximum Fall Speed].

a4707a828d24ed1840ea52aedb68255e

Because of this variable, the object’s fall speed keeps increasing. It only falls slowly if the jump is triggered at the peak, but even then, it accelerates as it descends. If the object is already falling in a deep pit at 350 pixels per second, ignoring gravity by 99.9% still results in a rapid fall.

In the end, I couldn’t achieve the effect of a slow, constant-speed fall.

Then I thought that by modifying the [Maximum Fall Speed] variable during this slow-fall action, I could achieve the desired constant slow descent.

Unfortunately, this variable is not available in the VS preset variable pool for modification.

But the variable does exist. For some reason, the developers chose not to include it in VariableSettings.

If possible, I hope this variable can be added in the next update, allowing creators to easily implement and freely adjust fall speeds for different actions.

2 Likes

Let’s use this simple signal + simple code approach for now (I’ll also explain how signals are used along the way).

(1) Create a signal in the desired VS action.

  1. Attach a GDScript to the “move and jump” node of this object.

  1. Select this object and click the node icon in the top-right corner (your custom-named signal will appear here).

  1. Double-click the signal to connect it to the “move and jump” node.

  1. Open the GDScript for the “move and jump” node. You will see the signal method appear. Add a line of code to modify this property. (Done, tested and works.)

  1. Note: If the next action needs to reset this value, you must perform the same operation again to emit a signal and use the same method to restore the value.

Additionally you can also use ChangeObjectProperty to adjust the max fall speed!

1 Like

I learned something new too. This action is much more convenient. I still need to dig deeper into VS knowledge! (I was previously misled by the term “object properties,” thinking it only allowed modifying the object’s own properties and not its child node properties. But it turns out you can modify them!)

3 Likes

So that’s where you change the variables!

I’ve been using variables and switches all the time, but I never paid much attention to character stats.

This tutorial is very helpful. Thank you so much!

3 Likes