ItsMods

Full Version: Freeze walking but not looking around?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to freeze a player so he cannot walk, but when he's frozen he will be able to turn around, shoot etc?

I tried
Code:
freezeWalk()
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "stop_freezing" );
    
    origin = self getOrigin();
    while( !gameflag( "prematch_done" ) )
    {
        self setOrigin( origin );
        wait .05;
    }
    
    self notify( "stop_freezing" );
}

but it sucks because the player will be spacing all over the place
(06-01-2011, 21:16)iAegle Wrote: [ -> ]Is it possible to freeze a player so he cannot walk, but when he's frozen he will be able to turn around, shoot etc?

cmMOD has this feature before the game starts. I think you can do that by setting running speed to 0.
setdvar("g_speed","0");
(06-01-2011, 21:24)surtek Wrote: [ -> ]
(06-01-2011, 21:16)iAegle Wrote: [ -> ]Is it possible to freeze a player so he cannot walk, but when he's frozen he will be able to turn around, shoot etc?

cmMOD has this feature before the game starts. I think you can do that by setting running speed to 0.

Thanks works fine ^^

Code:
freezeWalk( thing )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "stop_freezing" );
    
    self setMoveSpeedScale( 0 );
    
    while( !gameflag( "prematch_done" ) )
        wait .05;
        
    self maps\mp\gametypes\_weapons::updateMoveSpeedScale();
    
    self notify( "stop_freezing" );
}
Code:
for(;;)
{
self setVelocity((0,0,0));
wait 0.05;
}
(06-01-2011, 21:42)AZUMIKKEL Wrote: [ -> ]
Code:
for(;;)
{
self setVelocity((0,0,0));
wait 0.05;
}

Whats the default velocity? so when prematch is done it resets to default?
(06-01-2011, 21:46)iAegle Wrote: [ -> ]
(06-01-2011, 21:42)AZUMIKKEL Wrote: [ -> ]
Code:
for(;;)
{
self setVelocity((0,0,0));
wait 0.05;
}

Whats the default velocity? so when prematch is done it resets to default?

Velocity changes when you fall move etc..

And it's in a loop so wouldn't it just be manual when you stop the loop?
(06-01-2011, 21:51)Pozzuh Wrote: [ -> ]
(06-01-2011, 21:46)iAegle Wrote: [ -> ]
(06-01-2011, 21:42)AZUMIKKEL Wrote: [ -> ]
Code:
for(;;)
{
self setVelocity((0,0,0));
wait 0.05;
}

Whats the default velocity? so when prematch is done it resets to default?

Velocity changes when you fall move etc..

And it's in a loop so wouldn't it just be manual when you stop the loop?

Dunno if it stops? whatever I got something else working so it doesnt matter.
setVelocity is like setOrigin, it's a one-time use