Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving the Player
SLi78 Offline
Junior Member

Posts: 23
Threads: 6
Joined: Sep 2010
Reputation: 0
#1
Moving the Player

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 ?
09-20-2010, 03:01 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
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
Website Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#3
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
Find
SLi78 Offline
Junior Member

Posts: 23
Threads: 6
Joined: Sep 2010
Reputation: 0
#4
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 happensSad

UH SORRY WRONG FUNCTION
(This post was last modified: 09-20-2010, 03:26 PM by SLi78.)
09-20-2010, 03:17 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#5
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
Website Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#6
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 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:04 PM
Website Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#7
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. Big Grin

09-20-2010, 04:27 PM
Find




Users browsing this thread: 1 Guest(s)