Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


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

Posts: 23
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 3,547
Joined: Apr 2006
Reputation: 165
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
SLi78 Offline
Junior Member

Posts: 23
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 3,547
Joined: Apr 2006
Reputation: 165
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 3,547
Joined: Apr 2006
Reputation: 165
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)