I have recently been trying to adapt Nash's less slippery movement code to work with another mod (Ashes 2063), however I am having a huge issue with the mod...
The game has vehicle sections, where the player goes into a different state, and in that state, the player does their movement through A_Recoil, and some sections require you to carry this momentum from the recoil in order to jump gaps
In order to not break this system, I have written an "exception" in the code that disables itself whenever you're on this bike state, and that works pretty much perfectly, as expected...
HOWEVER, this ONLY seems to work properly during a first time map load! After you load a save/autosave, while on the ground, the vehicle section works fine, but whenever you're on the air, all momentum is pretty much lost, making completing the level/section IMPOSSIBLE.
I have banged my head against a wall for a long, long time, trying to figure out how to get the damn thing to work, but I've had no luck. I'm only an amateur at coding, so I don't have that much of an idea of what I'm actually doing. If any coders here could maybe put me in the right direction in regards of how to make this mod work, it'd be HUGELY appreciated!
EDIT:
Hey! I have figured out how to fix this!
Code: Select all
// Air Controller
if
(
FindInventory("motohandles")
)
{
level.aircontrol = 0.00390625;
}
else if((Pos.Z != FloorZ) && (vel.x != 0 || vel.y != 0))
{
level.airControl = 0.64;
}
else
{
level.aircontrol = 0.00390625;
}