Frictional Games Forum (read-only)

Full Version: Moving the Player
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?
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.
(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.
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
(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.
(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.
(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