AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disable fast moving with things (https://forums.alliedmods.net/showthread.php?t=64893)

hleV 12-26-2007 19:57

Disable fast moving with things
 
1 Attachment(s)
Hi, in many maps there are things (like boxes), that can be moved, I mean if I go forward and touch the thing, I go forward with that thing (maybe little slower). What I want is to disable ability to move very fast, when I press E (+use) button on that thing, that the thing could only be moved by touching and walking in it, and would nothing change when I press E button. Can someone make something like that?

M249-M4A1 12-27-2007 03:21

Re: Disable fast moving with things
 
I don't know if your talking about the use glitch with moveable objects, but it seems like that's something that can't be fixed (at least I did not find a solution)

fxfighter 12-27-2007 13:08

Re: Disable fast moving with things
 
The box or object you kan move is tied whit an ent(func_pushable)
we culd easly remove the hole move able object but dont know what to do if you want to keep it.

engine
Code:


* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <engine>
new P_move
public plugin_init() {
register_plugin("nomove", "0.1", "fxfighter")
P_move = register_cvar( "amxx_nomoveable", "1" )
nomove()
}
public nomove()
{
if(!get_pcvar_num(P_move))
{
return PLUGIN_HANDLED
}
 
new ent = -1
while((ent = find_ent_by_class(ent,"func_pushable")) != 0){
remove_entity(ent)
}
return PLUGIN_CONTINUE
}


Vet 12-28-2007 10:28

Re: Disable fast moving with things
 
Quote:

Originally Posted by fxfighter (Post 567373)
we culd easly remove the hole move able object but dont know what to do if you want to keep it.

(func_wall)

But I don't think he's not trying to disable the movement altogether, I think he just wants to move faster when pressing the +USE key. Try setting the friction to a lower value when the player is touching it and pressing the +USE key and see if that works.

kp_uparrow 12-29-2007 00:50

Re: Disable fast moving with things
 
Quote:

Originally Posted by Vet (Post 567683)
(func_wall)

But I don't think he's not trying to disable the movement altogether, I think he just wants to move faster when pressing the +USE key. Try setting the friction to a lower value when the player is touching it and pressing the +USE key and see if that works.

no no, he wants slower movement when pushing, and reading fxfighter made me choke

Vet 12-29-2007 00:58

Re: Disable fast moving with things
 
Ah right. Well the solution will be nearly the same. Detect the touch and disable the USE key while touching it.

hleV 01-24-2008 07:12

Re: Disable fast moving with things
 
*bumb*

hebusletroll 01-25-2008 07:43

Re: Disable fast moving with things
 
Quote:

Originally Posted by Vet (Post 567943)
Ah right. Well the solution will be nearly the same. Detect the touch and disable the USE key while touching it.

So, since the first HL release, pushing an object with use key is bugged : you move fastly because friction is not managed very well. But YOU CANNOT remove +USE function because if you can push an object, you can also pull it !! And pull work only if you use the +USE key.

ConnorMcLeod 01-25-2008 08:57

Re: Disable fast moving with things
 
Detect touch won't work since you don't need to touch object to push/pull them.

Arkshine 01-25-2008 08:58

Re: Disable fast moving with things
 
Would not be a good way to hook +use key and altering entitie friction value ?


All times are GMT -4. The time now is 11:02.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.