Frictional Games Forum (read-only)
Moving the Player - 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: Moving the Player (/thread-4613.html)



Moving the Player - SLi78 - 09-20-2010

Hi there,

one question againBlush, surely not the last

After Hearing something, the player should turn to the point and go there.

The turning is no poblem, that work s fine with "StartPlayerLockedAt".

But how can i move the player?

I have tried to "setchekpoints" but that doesent work, i also tried "AddEnemyPatrolNode" on the player, but that doesnt work to.

Is there a chance to move the player or must i use fading and teleporting ?


RE: Moving the Player - jens - 09-20-2010

He can't really move like that. You can use AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords); to "push" him, but I don't think it will behave so it looks like he is walking.


RE: Moving the Player - Pandemoneus - 09-20-2010

(09-20-2010, 03:08 PM)jens Wrote: He can't really move like that. You can use AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords); to "push" him, but I don't think it will behave so it looks like he is walking.

Unfortunately, that doesn't seem to do anything for me.


RE: Moving the Player - SLi78 - 09-20-2010

OK, thanks.

Just another question.

Is there a function that i can get the coordinates from areas e.g. from a posnode?

Something like "PathNode.GetX".
Well, i have set
Code:
AddBodyImpulse("Player", 100,100,100, "");
AddBodyForce("Player", 100,100,100, "");

after my "StopPlayerLookAt()" and i cant see that anything happensSad

UH SORRY WRONG FUNCTION


RE: Moving the Player - jens - 09-20-2010

(09-20-2010, 03:17 PM)Pandemoneus Wrote:
(09-20-2010, 03:08 PM)jens Wrote: He can't really move like that. You can use AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords); to "push" him, but I don't think it will behave so it looks like he is walking.

Unfortunately, that doesn't seem to do anything for me.

It works, check the script for 29_orb_chamber for example to see it in action. It is used to push the player away when colliding with the blue fire around Alexander.


RE: Moving the Player - jens - 09-20-2010

(09-20-2010, 03:17 PM)SLi78 Wrote: OK, thanks.

Just another question.

Is there a function that i can get the coordinates from areas e.g. from a posnode?

Something like "PathNode.GetX".
Well, i have set
Code:
AddBodyImpulse("Player", 100,100,100, "");
AddBodyForce("Player", 100,100,100, "");

after my "StopPlayerLookAt()" and i cant see that anything happensSad

UH SORRY WRONG FUNCTION

Not entirely sure what you mean, describe what sort of situation you are trying to create and I can give a suggestion on how to do it.


RE: Moving the Player - Pandemoneus - 09-20-2010

(09-20-2010, 04:03 PM)jens Wrote:
(09-20-2010, 03:17 PM)Pandemoneus Wrote:
(09-20-2010, 03:08 PM)jens Wrote: He can't really move like that. You can use AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords); to "push" him, but I don't think it will behave so it looks like he is walking.

Unfortunately, that doesn't seem to do anything for me.

It works, check the script for 29_orb_chamber for example to see it in action. It is used to push the player away when colliding with the blue fire around Alexander.

Ah, my bad then. I only tried values until 1000, I didn't know that you have to choose at least 10000 to make it have any effect. Big Grin