Frictional Games Forum (read-only)
AddPlayerBodyForce not 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: AddPlayerBodyForce not work (/thread-17642.html)



AddPlayerBodyForce not work - Lake - 08-10-2012

this is the script:

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "spinta", true, 1);
}

void spinta(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "spinta", 0, false);
AddPlayerBodyForce(2.26, 2.25, 9.5, false);
}

because it does not work?


RE: AddPlayerBodyForce not work - The Shanus - 08-10-2012

(08-10-2012, 10:39 AM)Lake Wrote: this is the script:

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "spinta", true, 1);
}

void spinta(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "spinta", 0, false);
AddPlayerBodyForce(2.26f, 2.25f, 9.5f, false);
}

because it does not work?
Need to put "f"s on the numbers because they're floats, try that.


RE: AddPlayerBodyForce not work - Lake - 08-10-2012

I tryed but don't work.


RE: AddPlayerBodyForce not work - The Shanus - 08-10-2012

(08-10-2012, 12:12 PM)Lake Wrote: I tryed but don't work.
Maybe just increase the numbers :p I have a door explosion in one map and it knocks the player back 27000,0,0 and that's only like 5 metres


RE: AddPlayerBodyForce not work - Lizard - 08-10-2012

to move the player, you need at least 2000, to make a visible chance


RE: AddPlayerBodyForce not work - Lake - 08-10-2012

ok problem solved Wink