SLi78
Junior Member
Posts: 23
Threads: 6
Joined: Sep 2010
Reputation:
0
|
Moving the Player
Hi there,
one question again , 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 ?
|
|
09-20-2010, 03:01 PM |
|
jens
Frictional Games
Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation:
202
|
RE: Moving the Player
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 |
|
Pandemoneus
Senior Member
Posts: 328
Threads: 2
Joined: Sep 2010
Reputation:
0
|
RE: Moving the Player
(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.
|
|
09-20-2010, 03:17 PM |
|
SLi78
Junior Member
Posts: 23
Threads: 6
Joined: Sep 2010
Reputation:
0
|
RE: Moving the Player
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
AddBodyImpulse("Player", 100,100,100, "");
AddBodyForce("Player", 100,100,100, "");
after my "StopPlayerLookAt()" and i cant see that anything happens
UH SORRY WRONG FUNCTION
(This post was last modified: 09-20-2010, 03:26 PM by SLi78.)
|
|
09-20-2010, 03:17 PM |
|
jens
Frictional Games
Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation:
202
|
RE: Moving the Player
(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, 04:03 PM |
|
jens
Frictional Games
Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation:
202
|
RE: Moving the Player
(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
AddBodyImpulse("Player", 100,100,100, "");
AddBodyForce("Player", 100,100,100, "");
after my "StopPlayerLookAt()" and i cant see that anything happens
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:04 PM |
|
Pandemoneus
Senior Member
Posts: 328
Threads: 2
Joined: Sep 2010
Reputation:
0
|
RE: Moving the Player
(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.
|
|
09-20-2010, 04:27 PM |
|
|