LUA Request: Player's friction
|
05-09-2010 06:48 PM
|
|
1-800-UNAGIPOWA
|
|
LUA Request: Player's friction
Requesting a way to change a player's friction on a per player basis
EDIT: Also a way to keep a player from moving, but retain their ability to look around
|
|
Issue Details
|
Category LUA (Map Scripting)
Status Accepted
Priority Unknown
Suggested Version Undefined
Implemented Version (none)
Votes for this feature
1
Votes against this feature
1
Assigned Users
(none)
Tags
(none)
|
|
05-09-2010 08:12 PM
|
|
Players can still look around with Freeze(bool).
|
05-09-2010 08:42 PM
|
|
Why on a per player basis? sv_friction is already in the server.cfg. If it's for a map you could just create an mapname.cfg. Per player commands are best left to sourcemod.
|
05-09-2010 08:52 PM
|
|
1-800-UNAGIPOWA
|
|
|
Quote:
Originally Posted by [AE] 82694
Why on a per player basis? sv_friction is already in the server.cfg. If it's for a map you could just create an mapname.cfg. Per player commands are best left to sourcemod.
|
Minigolf... bro
|
05-09-2010 09:13 PM
|
|
WhenNailGrenWillOut?
|
|
|
Quote:
Originally Posted by cjeshjoir
Minigolf... bro
|
Hell yeah.
|
05-09-2010 09:37 PM
|
|
Who the fuck is this guy?
|
|
|
LUA has a speed effect for a single player.. check Waterpolo for uses. (just make it 0)
|
05-09-2010 10:03 PM
|
|
You could just use Freeze(bool) instead of having to manage effects.
|
05-09-2010 10:07 PM
|
|
1-800-UNAGIPOWA
|
|
|
Ive tested both ways and they will both work, but making civvies bounce around is the only part thats left
|
05-09-2010 11:15 PM
|
|
Stuff Do-er
|
|
|
There is a baseentity:SetFriction( float ) function in lua right now, but it was being mapped to the wrong function in 2.41. It should be fixed in future versions, but I'm not sure if it'll even work for players. Try it in the beta version.
|
05-10-2010 02:51 AM
|
|
1-800-UNAGIPOWA
|
|
|
Doesn't seem to work for players, but I suck a lot... Anyone else test this?
|
05-10-2010 04:07 AM
|
|
It doesn't work.
|
02-23-2012 07:10 PM
|
|
Gets tickled by FF
|
|
|
This does set the friction to the extent it returns the same value if i use get friction but it doesn't seem to have any effect.
Is it me?
Code:
function player_spawn( player_entity )
local player = CastToPlayer( player_entity )
ChatToPlayer(player, player:GetFriction().." = fric")
player:SetFriction(999) --or whatever (tried 0.00001)
ChatToPlayer(player, player:GetFriction().." = fric")
end
|
02-23-2012 09:22 PM
|
|
Stuff Do-er
|
|
|
Player-specific friction was commented out of the movement code, I believe. Would be worth re-implementing it.
|
All times are GMT. The time now is 09:14 PM.