Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Addbodyforce doesn't work?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Addbodyforce doesn't work?

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 " - "
09-26-2015, 03:44 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Addbodyforce doesn't work?

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?

(This post was last modified: 09-26-2015, 05:08 PM by Mudbill.)
09-26-2015, 05:08 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: Addbodyforce doesn't work?

(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....
09-26-2015, 05:17 PM
Find




Users browsing this thread: 1 Guest(s)