Player float script problem - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Player float script problem (/thread-6479.html) |
Player float script problem - Acies - 02-05-2011 Hi, I'm having some issues on making a player float/fly upwards in my custom map. Nothing happens. I receive a message from the "SetMessage" so there shouldn't be anything wrong with the callback. These are the scripts: void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_Area4Levitate", "CollideScriptArea_Area4Levitate", false, 1); } void CollideScriptArea_Area4Levitate(string &in asParent, string &in asChild, int alState) { AddTimer("FloatTime1", 0.08, "FloatPlayer1"); AddTimer("FloatTime2", 0.16, "FloatPlayer2"); AddTimer("FloatTime3", 0.24, "FloatPlayer3"); } void FloatPlayer1(string &in asTimer) { AddPropImpulse("Player", 0, 2000.0f, 0, ""); } void FloatPlayer2(string &in asTimer) { AddPlayerBodyForce(0, 4000.0, 0, false); AddPropImpulse("Player", 0, 2500.0f, 0, ""); } void FloatPlayer3(string &in asTimer) { SetMessage("Area4", "Test", 4); AddPlayerBodyForce(0, 2000, 0, false); AddPropImpulse("Player", 0, 2000.0f, 0, ""); } RE: Player float script problem - Pandemoneus - 02-05-2011 AddPropImpulse for Player doesn't work. If you want to push the player, use AddPlayerBodyForce. You should also use values above 4000+ to see any effect. RE: Player float script problem - Acies - 02-05-2011 Thank you for the quick reply. I added "AddPlayerBodyForce(0, 2000, 0, false);" as well but the values, as you stated were too low. |