Forums Gallery LOGIN |REGISTER

How to restrict speed of the player's movement

Topics on creating any sort of animation or cinematic using Sandbox 2 should be posted inside this forum.


 

User avatar ItalianPride
Regular Dev
Regular Dev
 
Posts: 567
Member since: 18.05.2009, 18:28
Location: Vancouver, Canada
Likes: 0

How to restrict speed of the player's movement

Postby ItalianPride » 01.11.2010, 02:08

I'm currently making a sequence for a map that involves walking with two squad members through some hostile territory.

Well, long story short, How would I make it so that the player is unable to run fast and is only able to move a walking speed. At about the speed you would be moving in "crouch" position, but in standing position. Like in Call of Duty.

Any Ideas?
I'm not racist! I hate everyone equally!
User avatar Blablah
Producer
Producer
 
Posts: 1844
Member since: 06.11.2007, 21:56
Location: Here
Likes: 0

Postby Blablah » 01.11.2010, 02:22

Been a while since I've had CE2 installed but I think g_walkMultiplier should do the trick, if you also disable sprinting.
Last edited by Blablah on 01.11.2010, 02:23, edited 1 time in total.
User avatar ItalianPride
Regular Dev
Regular Dev
 
Posts: 567
Member since: 18.05.2009, 18:28
Location: Vancouver, Canada
Likes: 0

Postby ItalianPride » 01.11.2010, 02:27

Thanks amico, I'll give it a try.
I'm not racist! I hate everyone equally!
User avatar A_Canadian
Junior Dev
Junior Dev
 
Posts: 378
Member since: 10.11.2008, 20:19
Location: Steel mill
Likes: 0

Postby A_Canadian » 13.12.2010, 11:06

OMG sweet. i realy need this!
but i also want something to slow down sprinting speed so u move at a human rate as well as walking.
i tried g_runmultiplier didnt work
i tried g_sprintmultiplier didnt work
any help would be fantastic
Image
User avatar the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9890
Images: 2
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 199

Postby the_grim » 13.12.2010, 11:14

g_walkmultiplier also affects sprinting speed. ;) If you want to adjust sprinting rate independent from walking speed, you should take a look at Scripts\Entities\Actor\player.LUA and tweak the values there.
User avatar Lavizh
News Posters
News Posters
 
Posts: 13998
Member since: 04.12.2007, 03:23
Location: Hamar, Norway
Likes: 979

Postby Lavizh » 13.12.2010, 11:18

If you're running a MOD you can manually adjust the speed running value :

g_suitSpeedEnergyConsumption = 0
g_suitSpeedMult = 2

found in \Game\Config\diff_xxx.cfg

but i would guess a direct use of FG would be a better idea.
Last edited by Lavizh on 13.12.2010, 11:19, edited 1 time in total.
 
 
Image 
 
Image  Image
User avatar A_Canadian
Junior Dev
Junior Dev
 
Posts: 378
Member since: 10.11.2008, 20:19
Location: Steel mill
Likes: 0

Postby A_Canadian » 14.12.2010, 05:18

thank you all!
Image