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
Making Player Walk (Please Help Me) The Labyrinth?
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#11
RE: Making Player Walk (Please Help Me) The Labyrinth?

Option 1: You can use teleports and fading.
Option 2: You can use the function AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords); with a timer, you give a small push every second.
Option 3: You use Justine Functions;
Option 4: You create an invisible floor that moves bellow the player.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
05-23-2011, 08:21 PM
Find Reply
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#12
RE: Making Player Walk (Please Help Me) The Labyrinth?

that fourth option, is that possible? How would i do that?

Also, what kind of force are we talking about to move the player a short distance? 50? 100? 1000?
(This post was last modified: 05-23-2011, 08:23 PM by Simpanra.)
05-23-2011, 08:22 PM
Find Reply
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#13
RE: Making Player Walk (Please Help Me) The Labyrinth?

2000 is the minimum force to move the player.
To make a movable floor, create an entity with a collision mesh only that moves along an axis with a constaint, then attach a prop valve to the floor by script, apply a moveforce onto the valve someway and the floor will move along the axis. It's the hardest way, and probably not the most efficient one.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
05-23-2011, 09:13 PM
Find Reply
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#14
RE: Making Player Walk (Please Help Me) The Labyrinth?

Actually, I used two methods for the cutscene in the labyrinth. The first time he walked, I didn't use the justine function; I had it so he spawned on the ground above the hole, and he started off with MovePlayerPosHead or whatever so it was positioned near the wooden beam. Then I just used that function to emulate him climbing and walking forward; look at the script for the last level.
05-23-2011, 09:30 PM
Find Reply
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#15
RE: Making Player Walk (Please Help Me) The Labyrinth?

ah awesome!!! So...what is the defualt head position and what would be say...one step forwards?
05-23-2011, 09:32 PM
Find Reply
Apjjm Offline
Is easy to say

Posts: 495
Threads: 18
Joined: Apr 2011
Reputation: 51
#16
RE: Making Player Walk (Please Help Me) The Labyrinth?

(05-23-2011, 09:32 PM)Simpanra Wrote: ah awesome!!! So...what is the defualt head position and what would be say...one step forwards?

Default head position is 0,0,0. You can then just make a timer that updates once every frame (1/60 seconds) which increments this value. Might be worth creating some speed variables though and decoupling changing the speed from the first timer, otherwise you will end up with one monster switch/case statement in the timer. Instead create several timers (1 is your main loop timer, changing the head position based on speed) the others can then change the speed at set intervals.

(This post was last modified: 05-23-2011, 09:58 PM by Apjjm.)
05-23-2011, 09:56 PM
Find Reply
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#17
RE: Making Player Walk (Please Help Me) The Labyrinth?

hmmm, what is the furthest the head can move from body? Can i make it go a few steps?
05-23-2011, 09:57 PM
Find Reply
Apjjm Offline
Is easy to say

Posts: 495
Threads: 18
Joined: Apr 2011
Reputation: 51
#18
RE: Making Player Walk (Please Help Me) The Labyrinth?

(05-23-2011, 09:57 PM)Simpanra Wrote: hmmm, what is the furthest the head can move from body? Can i make it go a few steps?

Limited by the largest number a float can represent, which is very, very big. You can totally ignore how far you are moving the head - just remember to set it back to 0,0,0 at the end, otherwise the player will have trouble doing stuff Wink.

(This post was last modified: 05-23-2011, 10:00 PM by Apjjm.)
05-23-2011, 10:00 PM
Find Reply
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#19
RE: Making Player Walk (Please Help Me) The Labyrinth?

Brilliant! =D Thank you! ^_^

One final question, lets say i want him to take one step forward along the x axis, how large is that float value? =)
05-23-2011, 10:08 PM
Find Reply
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#20
RE: Making Player Walk (Please Help Me) The Labyrinth?

Don't forget that in the end you must teleport the player to his final position, or he will return to the place where he was in the beggining.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
05-23-2011, 10:12 PM
Find Reply




Users browsing this thread: 1 Guest(s)