Frictional Games Forum (read-only)
Addbodyforce doesn't work? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Addbodyforce doesn't work? (/thread-30941.html)



Addbodyforce doesn't work? - Amnesiaplayer - 09-26-2015

Hello, I took a long break for my cs.
I finally tried to create one map.
The point of the map was, showing the "exo" abilaty.
If you jump on a certain area, you use your "Exo suit" and fly high, and a little bit forward.
I already made the sound etc.
but the thing is, this is the code ;
AddPlayerBodyForce(0, 0, 0, true);
Now, the first zero, is for Up and down, seconds is left and right, and last one if forward, or backwards.
Somehow, I CAN'T make the player jump even "A little bit" high.
So even if I had it like this
AddPlayerBodyForce(100000000000000, 0, 0, true);
It wouldn't work, Now my question is, is there something I need to do, or does this simply NOT work, because if this, is not gonna work, i'm really gonna take a break for like year, this map I made can make me so aggresive, if I can't do what I wanted to do, and nope there is "no way' to make this "happen" with something else, I mean having a big long rope hanging on a cliff won't be realistic xD

AND I tried everything I could, all numbers, with or without " - "


RE: Addbodyforce doesn't work? - Mudbill - 09-26-2015

The first number is not up/down. That's the second number. It goes by XYZ axes, so the first is X and the second is Y. A negative Y value would equal up (usually).

If you say you've tried them all to no result, are you sure the line is actually executed? Can you show the code?


RE: Addbodyforce doesn't work? - Amnesiaplayer - 09-26-2015

(09-26-2015, 05:08 PM)Mugbill Wrote: The first number is not up/down. That's the second number. It goes by XYZ axes, so the first is X and the second is Y. A negative Y value would equal up (usually).

If you say you've tried them all to no result, are you sure the line is actually executed? Can you show the code?

Oh, I just noticed that, altho if I use the second line, it still jumps to the left or right, meanwhile my script is like this :

void OnStart()
{
AddEntityCollideCallback("Player", "EXO", "ExoJump", true, 0);
}



void ExoJump(string &in asParent, string &in asChild, int alState)
{
PlayGuiSound("Boost_Jump_01", 1);
AddPlayerBodyForce(0, 1000000, 0, true);
}

I can't lower it, since you have to jump VERY high... I still don't understand why I move left automatic....